- 
contains(variables, value) 如果变量 variables 包含 value 值,则成功,否则失败。contains(variables, value) 通过判断是否添加某些模块来自动添加对应模块的代码文件。contains(QT, network) { 
 message("network build")
 HEADERS += network.hpp
 SOURCES += network.cpp
 }
- 
count(variables, value) 统计 variables 中包含 value 的数量count (variables, value) 应用例子options = $$find(CONFIG, "debug") 
 $$find(CONFIG, "release")count(options, 2) { 
 message(Both release and debug specified.)
 }
3. include(filename)
# 将指定的文件名包含到当前项目
include(filename)
# 应用例子
!include(core.pri) {
  message("load core.pri failed")
}4. if (condition)
# if 条件判断,和 C++ 的 if 语句一样。
if (condition)
# 应用例子
if (condition) {
    message("hello")
}- 
for (iter, list) 循环变量 list 中的所有值for(iter, list) 应用例子List = a b c 
 for(item, List): message(file = $${item})$ 打印输出 Project MESSAGE: file = aProject MESSAGE: file = bProject MESSAGE: file = c
- 
system (command) 执行 shell 命令, 执行命令返回0表示成功,否则失败。system("ls /bin"): RET = TRUE 
- 
mkpath (dir) 创建目录, 参数路径。 
- 
unset (variable_name) 将变量名从当前上下文中移除。 
9. 信息输出
message(string)  # 输出文本信息
warning(string)  # 输出警告信息
error(string)    # 输出错误信息- 
信息检测 估字符串的内容 返回 trueeval(string) 应用例子eval(TARGETS = app) { 
 message($$TARGETS)
 }