Because the previous use of Ubuntu under the Qtcreator development, now want to install a system on Mac, because it has not been installed, or spent a little time, rather than write a blog, the next time installed faster. With QT development under Mac OS X, QT libraries and compilers need to be configured. The compiler can only use clang that Apple has developed on its own.
The first is:
Download: Command_line_tools_macos, mine is macOS10.13.3:
https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_macOS_10.13_for_Xcode_10_Beta_3/ Command_line_tools_macos_10.13_for_xcode_10_beta_3.dmg
Then, download: xcode_9.4.1,
Https://download.developer.apple.com/Developer_Tools/Xcode_9.4.1/Xcode_9.4.1.xip
The above two installs are simple, double-click the default on the line.
Then, the installation of Qt and Qtcreator, many of the web is installed separately, but qt5.11.1 inside is qtcreator, download qt5.11.1:
Https://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/5.11/5.11.1/qt-opensource-mac-x64-5.11.1.dmg
Double-click to enter:
The basic components are as follows, MacOS to choose, otherwise, in the later QT version does not have value (just can't find qmake)
The rear is a long installation ... Then, need to check the configuration, I am referring to the online check, if you do not like it automatically configure Qt creator can install their own favorite version, and then the QT versions over there to find your QT installation path on it. Back, main references: 46234079
Configure QT
(1) Run QT Creator. Go to "menu", "Qt Creator", "preferences". As you can see, the "Compiler" and "debugger" are already set by default.
2) The user needs to manually configure the Qt version, remember, here the version path is found Qmake, if the above QT installation is not checked?? MacOS will not install Qmake, generally use the default Qtcreator, will be automatically configured for you
At this point, QT Qtcreator has been installed, can be used, but I generally like to use cmake construction, so in the new non-QT project->c++ Select CMake Build, Error
This file was not part of any project the code ...
In fact, I do not have the machine installed CMake:
$ Brew Install CMAK
Yes, if not, you need to rebuild it on Qt creator (no cmake,build, so the Debug and run buttons are gray)
Mac Book Pro macOS10.13.3 installs Qt, QT creator C + + development environment, qt5.11.1, and resolves CMake build: qt mac This file was not part of any project the code