自学内容网 自学内容网

Qt中的项目文件

QT       += core gui#core 核心模块  gui 窗口界面模块
# 在Qt4中 core gui widgets 是一体的
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 
CONFIG += c++11 #使用C++11标准编译
 
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS #编译器使用过时的Qt特性时 编译器会发出警告
 
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
 
SOURCES += \#可指定的源文件 一般情况下编译器默认添加
    main.cpp \
    widget.cpp
 
HEADERS += \#可指定的头文件 一般情况下编译器默认添加
    widget.h
 
FORMS += \
    widget.ui
 
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target


原文地址:https://blog.csdn.net/Life_winner_king/article/details/140696668

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!