qtConfig(inputdialog)

在qt工程文件中发现qtConfig(inputdialog)这个测试函数,这是qt提供的用qmake language写的函数,位置在:QtInstallDir\Qt5.12.0\5.12.0\msvc2015_64\mkspecs\features\qt_functions.prf

defineTest(qtConfig) {
    modules = $$QT $$QT_PRIVATE $$QT_FOR_CONFIG
    modules ~= s,-private$,_private,g
    modules = $$resolve_depends(modules, "QT.", ".depends")
    modules += global global_private
    modules = $$reverse(modules)
    for (module, modules) {
        contains(QT.$${module}.enabled_features, $$1): \
            return(true)
        contains(QT.$${module}.disabled_features, $$1): \
            return(false)
    }
    error("Could not find feature $${1}.")
}

就是判断inputdialog属性是否被配置。

下面是配置了inputdialog属性的一个模块:

QtInstallDir\Qt5.12.0\5.12.0\msvc2015_64\mkspecs\modules\qt_lib_widgets.pri

QT.widgets.VERSION = 5.12.0
QT.widgets.name = QtWidgets
QT.widgets.module = Qt5Widgets
QT.widgets.libs = $$QT_MODULE_LIB_BASE
QT.widgets.includes = $$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/QtWidgets
QT.widgets.frameworks =
QT.widgets.bins = $$QT_MODULE_BIN_BASE
QT.widgets.plugin_types = styles
QT.widgets.depends = core gui
QT.widgets.uses =
QT.widgets.module_config = v2
QT.widgets.CONFIG = uic
QT.widgets.DEFINES = QT_WIDGETS_LIB
QT.widgets.enabled_features = abstractbutton abstractslider groupbox buttongroup label pushbutton menu lineedit spinbox slider scrollbar scrollarea itemviews tableview toolbutton calendarwidget checkbox dialog dialogbuttonbox colordialog listview columnview combobox commandlinkbutton completer contextmenu datawidgetmapper datetimeedit dial filesystemmodel dirmodel resizehandler mainwindow dockwidget textedit errormessage splitter stackedwidget treeview filedialog fontcombobox fontdialog formlayout fscompleter graphicsview graphicseffect inputdialog keysequenceedit lcdnumber listwidget mdiarea menubar messagebox paint_debug progressbar progressdialog radiobutton rubberband scroller sizegrip splashscreen statusbar statustip style-stylesheet syntaxhighlighter tabbar tablewidget tabwidget textbrowser toolbar toolbox tooltip treewidget undocommand undostack undogroup undoview wizard
QT.widgets.disabled_features =
QT_CONFIG += groupbox buttongroup menu lineedit spinbox slider scrollbar scrollarea itemviews tableview toolbutton calendarwidget colordialog listview columnview combobox completer contextmenu datawidgetmapper datetimeedit dial filesystemmodel dirmodel resizehandler mainwindow dockwidget textedit errormessage splitter stackedwidget treeview filedialog fontcombobox fontdialog fscompleter graphicsview graphicseffect inputdialog keysequenceedit lcdnumber listwidget mdiarea menubar messagebox paint_debug progressbar progressdialog rubberband sizegrip splashscreen statusbar statustip style-stylesheet syntaxhighlighter tabbar tablewidget tabwidget textbrowser toolbar toolbox tooltip treewidget undocommand undostack undogroup undoview wizard
QT_MODULES += widgets

 qmake language qt 工程文件 配置文件 .pro .prl .prf 词法 语法 for循环 判断语句 函数定义_丘上人的博客-CSDN博客

需要注意的是CONFIG() 和isActiveConfig()是内建函数,用于判断变量CONFIG中是否有该属性。qmake language 内置函数 自定义函数 defineTest(testfunctionname) defineReplace(repacefunctionname)_丘上人的博客-CSDN博客_qmake 自定义函数


快速查找qt pro文件中的用qmake language写的库函数_丘上人的博客-CSDN博客

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值