Qt Creator和Qt Designer都是很好的学习项目。
一、官方源码下载
1、官方github源码
https://github.com/qt-creator/qt-creator Qt Creator源码
https://github.com/qt-creator/qt-creator/tree/master/src/plugins/designer Qt Creator的设计师插件
https://github.com/qt/qtbase Qt核心类源码
https://github.com/qt/qttools Qt工具类源码
https://github.com/qt/qttools/tree/dev/src/designer Qt设计师的源码
https://github.com/qt/qttools/tree/dev/src/windeployqt 依赖库工具源码
2、官方正式发行网站
http://download.qt.io/official_releases/qtcreator/4.10/4.10.2/ qt-creator-opensource-src-4.10.2.zip
http://download.qt.io/official_releases/qt/5.12/5.12.5/submodules/ qttools-opensource-src-5.12.5.zip,里面有Qt设计师的源码
二、笔者电脑的环境
1、Windows
Win7+Qt 5.12.5+Qt Creator 4.10+MSVC 2017 32bit+Python 3.7+ActivePerl-5.28 x64
2、MacOS-10.15-Catalina
MacOS 10.15.3+Qt 5.12.5+Qt Creator 4.10+Clang 11.0 x64+Python 3.7
Mac终端命令sw_vers可以查看Mac OS版本
Mac终端命令clang --version可以查看clang版本
三、编译
Qt Creator IDE分别打开源码文件夹的qtcreator.pro和qttools.pro文件,直接编译即可。
qt-creator-opensource-src-4.10.2
qttools-opensource-src-5.12.5
x、附录
build-qtcreator-Desktop_Qt_5_12_5_MSVC2017_32bit-Debug\src\app\app_version.h
#pragma once
namespace Core {
namespace Constants {
#define STRINGIFY_INTERNAL(x) #x
#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
const char IDE_DISPLAY_NAME[] = "Qt Creator";
const char IDE_ID[] = "qtcreator";
const char IDE_CASED_ID[] = "QtCreator";
#define IDE_VERSION 4.10.2
#define IDE_VERSION_STR STRINGIFY(IDE_VERSION)
#define IDE_VERSION_DISPLAY_DEF 4.10.2
#define IDE_VERSION_MAJOR 4
#define IDE_VERSION_MINOR 10
#define IDE_VERSION_RELEASE 2
const char * const IDE_VERSION_LONG = IDE_VERSION_STR;
const char * const IDE_VERSION_DISPLAY = STRINGIFY(IDE_VERSION_DISPLAY_DEF);
const char * const IDE_AUTHOR = "The Qt Company Ltd";
const char * const IDE_YEAR = "2019";
#ifdef IDE_REVISION
const char * const IDE_REVISION_STR = STRINGIFY(IDE_REVISION);
#else
const char * const IDE_REVISION_STR = "";
#endif
// changes the path where the settings are saved to
#ifdef IDE_SETTINGSVARIANT
const char * const IDE_SETTINGSVARIANT_STR = STRINGIFY(IDE_SETTINGSVARIANT);
#else
const char * const IDE_SETTINGSVARIANT_STR = "QtProject";
#endif
#ifdef IDE_COPY_SETTINGS_FROM_VARIANT
const char * const IDE_COPY_SETTINGS_FROM_VARIANT_STR = STRINGIFY(IDE_COPY_SETTINGS_FROM_VARIANT);
#else
const char * const IDE_COPY_SETTINGS_FROM_VARIANT_STR = "";
#endif
#undef IDE_VERSION_DISPLAY_DEF
#undef IDE_VERSION
#undef IDE_VERSION_STR
#undef STRINGIFY
#undef STRINGIFY_INTERNAL
} // Constants
} // Core
欢迎访问我的另一篇博客《使用Qt Creator IDE+MSVC2015 32bit编译器组合,自行编译Qt Creator源码4.8.2版本》
---
引申阅读
编写Qt Designer自定义控件(一)——如何创建并使用Qt自定义控件
编写Qt Designer自定义控件(二)——编写自定义控件界面