QT += core gui Qt包含的模块
qt5 基本模块 最重要三类 Qwidget Qtcore Qt gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets //大于4版本以上 包含widget模块
//TEMPLATE template 模板 应用程序模板 application target 目标 生成的.exe程序的名称
CONFIG += 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
# 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 \
mywidget.cpp
HEADERS += \
mywidget.h
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
//命令规范 //类名 首字母大写 单词和单词之间大写 //函数名 变量名称 首字母小写 单词和单词之间首字母大写 //快捷键 //注释 ctrl / 只能注释一行 //运行 ctrl r //编译 ctrl b //查找 ctrl f //整行移动 ctrl shift ↑或者↓ 相当于和上或者下一行调换顺序 //帮助文档 F1 没下 没有用 按ESC退出; 左侧按钮;assistance.exe 帮助窗口D:\BaiduNetdiskDownload\qtcreator\5.12.9\mingw73_32\bin //自动对齐 ctrl i //同名之间的.h 和.cpp切换 F4