1. QT的安装

(1)双击:qt-opensource-windows-x86-mingw492-5.6.0.exe

(2)安装过程中指定QT Creator安装目录下的mingw文件夹

(3)设置环境变量:设安装在D:\QT\

  ①新建一个QTDIR的变量,其值为D:\Qt\5.6\mingw49_32\bin;D:\Qt\5.6\android_armv7\bin;D:\Qt\5.6\android_x86\bin;D:\Qt\Tools\QtCreator\bin,然后将该变量添加到Path中(%QTDIR%;……)

  ②添加变量QTLIB,并将其值设为D:\Qt\5.6\mingw49_32\lib; D:\Qt\Tools\QtCreator\lib

(4)设置关联

  ①运行:QT Creator

  ②工具→选项…→构建和运行

  ③选择:“Qt 版本”标签→手动设置→添加…→选择“D:\Qt\5.6\mingw49_32\bin\qmake.exe”

2. QT是什么

(1)QT是一套跨平台的GUI开发库

(2)QT是一套C++集成开发环境

(3)QT是一套开源的殿堂级架构技术教程

3. 通过命令行的方式编译QT源程序

(1)启动QT命令行

(2)进入源程序所在目录

(3)命令:

  ①qmake –project  //根据目录中的源码生成工程文件

  ②qmake             //根据工程文件生成makefile文件

  ③mingw32-make      //根据makefile进行编译(旧版的用make编译

【编程实验】编译和运行第一个QT程序

 //main.cpp

#include <QApplication>
#include <QMainWindow>
#include <QPushButton>

int main(int argc, char* argv[])
{
    QApplication a(argc, argv);
    QMainWindow w;
    QPushButton b(&w);
    
    b.setText("Hello QT!");
    
    w.show();
    
    return a.exec();   
}

  ▲用命令行编译的步骤▲

  ①qmake –project  (注意:红色部分是手工加上去的!加上编译选项后会自动生成,qmake -project " QT += widgets"

######################################################################
# Automatically generated by qmake (3.0) ?? 4? 22 20:33:29 2016
######################################################################
QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TEMPLATE = app
TARGET = HelloWorld
INCLUDEPATH += .

# Input
SOURCES += main.cpp

  ②qmake 生成makefile

第4课 Hello QT_3d第4课 Hello QT_3d_02
#############################################################################
# Makefile for building: HelloWorld
# Generated by qmake (3.0) (Qt 5.6.0)
# Project:  HelloWorld.pro
# Template: app
# Command: D:\Qt\5.6\mingw49_32\bin\qmake.exe -o Makefile HelloWorld.pro
#############################################################################

MAKEFILE      = Makefile

first: release
install: release-install
uninstall: release-uninstall
QMAKE         = D:\Qt\5.6\mingw49_32\bin\qmake.exe
DEL_FILE      = del
CHK_DIR_EXISTS= if not exist
MKDIR         = mkdir
COPY          = copy /y
COPY_FILE     = copy /y
COPY_DIR      = xcopy /s /q /y /i
INSTALL_FILE  = copy /y
INSTALL_PROGRAM = copy /y
INSTALL_DIR   = xcopy /s /q /y /i
DEL_FILE      = del
SYMLINK       = $(QMAKE) -install ln -f -s
DEL_DIR       = rmdir
MOVE          = move
SUBTARGETS    =  \
        release \
        debug


release: FORCE
    $(MAKE) -f $(MAKEFILE).Release
release-make_first: FORCE
    $(MAKE) -f $(MAKEFILE).Release 
release-all: FORCE
    $(MAKE) -f $(MAKEFILE).Release all
release-clean: FORCE
    $(MAKE) -f $(MAKEFILE).Release clean
release-distclean: FORCE
    $(MAKE) -f $(MAKEFILE).Release distclean
release-install: FORCE
    $(MAKE) -f $(MAKEFILE).Release install
release-uninstall: FORCE
    $(MAKE) -f $(MAKEFILE).Release uninstall
debug: FORCE
    $(MAKE) -f $(MAKEFILE).Debug
debug-make_first: FORCE
    $(MAKE) -f $(MAKEFILE).Debug 
debug-all: FORCE
    $(MAKE) -f $(MAKEFILE).Debug all
debug-clean: FORCE
    $(MAKE) -f $(MAKEFILE).Debug clean
debug-distclean: FORCE
    $(MAKE) -f $(MAKEFILE).Debug distclean
debug-install: FORCE
    $(MAKE) -f $(MAKEFILE).Debug install
debug-uninstall: FORCE
    $(MAKE) -f $(MAKEFILE).Debug uninstall

Makefile: HelloWorld.pro D:/Qt/5.6/mingw49_32/mkspecs/win32-g++/qmake.conf D:/Qt/5.6/mingw49_32/mkspecs/features/spec_pre.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/qdevice.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/features/device_config.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/common/angle.conf \
        D:/Qt/5.6/mingw49_32/mkspecs/qconfig.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dcore.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dcore_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dinput.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dinput_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dlogic.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dlogic_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dquick.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dquick_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dquickinput.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dquickinput_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dquickrender.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dquickrender_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3drender.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3drender_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_axbase.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_axbase_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_axcontainer.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_axcontainer_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_axserver.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_axserver_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_bluetooth.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_bluetooth_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_bootstrap_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_clucene_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_concurrent.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_concurrent_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_core.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_core_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_dbus.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_dbus_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_designer.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_designer_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_designercomponents_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_gui.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_gui_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_help.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_help_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_labscontrols_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_labstemplates_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_location.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_location_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_multimedia.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_multimedia_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_multimediawidgets.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_multimediawidgets_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_network.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_network_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_nfc.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_nfc_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_opengl.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_opengl_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_openglextensions.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_openglextensions_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_platformsupport_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_positioning.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_positioning_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_printsupport.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_printsupport_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_qml.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_qml_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_qmldevtools_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_qmltest.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_qmltest_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_quick.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_quick_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_quickparticles_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_quickwidgets.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_quickwidgets_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_script.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_script_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_scripttools.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_scripttools_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_sensors.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_sensors_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_serialbus.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_serialbus_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_serialport.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_serialport_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_sql.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_sql_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_svg.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_svg_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_testlib.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_testlib_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_uiplugin.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_uitools.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_uitools_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_webchannel.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_webchannel_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_websockets.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_websockets_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_widgets.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_widgets_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_winextras.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_winextras_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_xml.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_xml_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_xmlpatterns.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_xmlpatterns_private.pri \
        D:/Qt/5.6/mingw49_32/mkspecs/features/qt_functions.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/qt_config.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/win32/qt_config.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/win32-g++/qmake.conf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/spec_post.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/exclusive_builds.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/default_pre.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/win32/default_pre.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/resolve_config.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/exclusive_builds_post.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/default_post.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/win32/rtti.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/precompile_header.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/warn_on.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/qt.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/resources.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/moc.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/win32/opengl.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/uic.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/win32/windows.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/testcase_targets.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/exceptions.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/yacc.prf \
        D:/Qt/5.6/mingw49_32/mkspecs/features/lex.prf \
        HelloWorld.pro \
        D:/Qt/5.6/mingw49_32/lib/qtmain.prl \
        D:/Qt/5.6/mingw49_32/lib/Qt5Widgets.prl \
        D:/Qt/5.6/mingw49_32/lib/Qt5Gui.prl \
        D:/Qt/5.6/mingw49_32/lib/Qt5Core.prl
    $(QMAKE) -o Makefile HelloWorld.pro
D:/Qt/5.6/mingw49_32/mkspecs/features/spec_pre.prf:
D:/Qt/5.6/mingw49_32/mkspecs/qdevice.pri:
D:/Qt/5.6/mingw49_32/mkspecs/features/device_config.prf:
D:/Qt/5.6/mingw49_32/mkspecs/common/angle.conf:
D:/Qt/5.6/mingw49_32/mkspecs/qconfig.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dcore.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dcore_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dinput.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dinput_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dlogic.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dlogic_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dquick.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dquick_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dquickinput.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dquickinput_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dquickrender.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3dquickrender_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3drender.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_3drender_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_axbase.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_axbase_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_axcontainer.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_axcontainer_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_axserver.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_axserver_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_bluetooth.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_bluetooth_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_bootstrap_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_clucene_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_concurrent.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_concurrent_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_core.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_core_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_dbus.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_dbus_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_designer.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_designer_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_designercomponents_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_gui.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_gui_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_help.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_help_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_labscontrols_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_labstemplates_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_location.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_location_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_multimedia.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_multimedia_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_multimediawidgets.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_multimediawidgets_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_network.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_network_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_nfc.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_nfc_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_opengl.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_opengl_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_openglextensions.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_openglextensions_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_platformsupport_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_positioning.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_positioning_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_printsupport.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_printsupport_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_qml.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_qml_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_qmldevtools_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_qmltest.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_qmltest_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_quick.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_quick_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_quickparticles_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_quickwidgets.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_quickwidgets_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_script.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_script_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_scripttools.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_scripttools_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_sensors.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_sensors_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_serialbus.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_serialbus_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_serialport.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_serialport_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_sql.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_sql_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_svg.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_svg_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_testlib.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_testlib_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_uiplugin.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_uitools.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_uitools_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_webchannel.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_webchannel_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_websockets.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_websockets_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_widgets.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_widgets_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_winextras.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_winextras_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_xml.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_xml_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_xmlpatterns.pri:
D:/Qt/5.6/mingw49_32/mkspecs/modules/qt_lib_xmlpatterns_private.pri:
D:/Qt/5.6/mingw49_32/mkspecs/features/qt_functions.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/qt_config.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/win32/qt_config.prf:
D:/Qt/5.6/mingw49_32/mkspecs/win32-g++/qmake.conf:
D:/Qt/5.6/mingw49_32/mkspecs/features/spec_post.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/exclusive_builds.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/default_pre.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/win32/default_pre.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/resolve_config.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/exclusive_builds_post.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/default_post.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/win32/rtti.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/precompile_header.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/warn_on.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/qt.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/resources.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/moc.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/win32/opengl.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/uic.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/win32/windows.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/testcase_targets.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/exceptions.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/yacc.prf:
D:/Qt/5.6/mingw49_32/mkspecs/features/lex.prf:
HelloWorld.pro:
D:/Qt/5.6/mingw49_32/lib/qtmain.prl:
D:/Qt/5.6/mingw49_32/lib/Qt5Widgets.prl:
D:/Qt/5.6/mingw49_32/lib/Qt5Gui.prl:
D:/Qt/5.6/mingw49_32/lib/Qt5Core.prl:
qmake: FORCE
    @$(QMAKE) -o Makefile HelloWorld.pro

qmake_all: FORCE

make_first: release-make_first debug-make_first  FORCE
all: release-all debug-all  FORCE
clean: release-clean debug-clean  FORCE
distclean: release-distclean debug-distclean  FORCE
    -$(DEL_FILE) Makefile

release-mocclean:
    $(MAKE) -f $(MAKEFILE).Release mocclean
debug-mocclean:
    $(MAKE) -f $(MAKEFILE).Debug mocclean
mocclean: release-mocclean debug-mocclean

release-mocables:
    $(MAKE) -f $(MAKEFILE).Release mocables
debug-mocables:
    $(MAKE) -f $(MAKEFILE).Debug mocables
mocables: release-mocables debug-mocables

check: first
FORCE:

$(MAKEFILE).Release: Makefile
$(MAKEFILE).Debug: Makefile
View Code   

  ③ming32-make 进行编译

4. QT Creator

(1)可视化的集成开发环境

  ①QT Creator提供了强大的代码编辑功能

  ②QT Creator提供了强大的调试功能

(2)调试的基本方法

  ①Log调试法:在代码加入一定的打印语句,打印程序状态和关键变量的值。

         //包含头文件:#include <QDebug>

         //调试输出:qDebug() << i; //在“应用程序输出”窗口中可观察输出的结果

  ②断点调试法:条件断点,如i == 7

【编程实验】QT Creator使用初体验(对上个项目进行调试,此处省略程序源码…)

5. 小结

(1)QT是一套跨平台的C++界面开发库

(2)可以通过命令行的方式开发QT应用程序

(3)也可以通过QT Creator进行QT开发

(4)QT Creator同时支持Log调试法断点调试法