1) Prerequisites
Before installation, ensure your macOS operating system is current. Select menu -> 'System Preferences' -> 'Software Update' and check whether any OS updates are available. If so, install them first and only then proceed with the rest of this installation guide. In order to install QtCreator, you need to have a version of MacOS that is >= 10.13. If this is not possible for you, please reach out to the course staff ASAP.
Install the License File (Commercially Licensed Qt Only) If you use Qt with a commercial license, the. Qt Designer normally ships as a part of Qt Creator. This is Qt's official editor and lets you do a lot more than just graphically design user interfaces. It is a full-fledged and very powerful C IDE. This power comes at a price however: The download for Qt Creator is gigabytes in size! You can use Qt Creator to build, run, debug, and analyze applications on these platforms. Hi, forgive me - of course you need those infos: Mac OS X Mojave 10.14.6 Qt Creator 4.11.2 Based on Qt 5.14.2 (Clang 10.0 (Apple), 64 bit) Built on Mar 27 2020 02:24:45.
2) Install Xcode tools
Apple's developer tools are bundled as a part of Xcode. Installing Xcode provides the C++ compiler that is used by Qt Creator.
To choose the correct Xcode installation, you need to know your macOS version. Select menu -> 'About This Mac' and read the macOS version number.
If your macoS version is Catalina >= 10.15, you can install the latest Xcode directly from the App Store by following these steps:
Select menu - > 'App Store…' and search for Xcode. Download and install the app.
If your macOS version is 10.14 or older, you need to install an older Xcode. Older versions of Xcode are available at Apple Developer Downloads by following these steps
- Visit https://developer.apple.com/downloads/ and sign in with your Apple ID.
- Search for Xcode and select the version that is compatible with your macOS version:
- For macOS 10.14, use Xcode version 11.3
- For macOS 10.13, use Xcode version 10.1
- Do not chose any version labeled 'beta' or 'preview'
- If the Apple developer site disallows you from accessing downloads, create a new Apple ID and try again. (This can happen if your Apple ID was created when your age was too young for some features?)
- Download the appropriate version, open the archive, launch the Xcode installer, and follow through the installer steps.
- After the installer finishes, drag the XCode application into your Applications folder.
Xcode is a very large app, so the download and installation will take some time, and can be anywhere from 1-4 hours depending on your network connection speed. If your computer does not have enough space for Xcode, or if the download will take prohibitively long (more than 24 hours) due to the quality of your internet connection, reach out to the Head TA for alternate installation instructions.
3) Run Xcode once
After downloading Xcode, you have to launch the Xcode application one time to install its components.You can open Xcode using Spotlight (the magnifying glass at the top right of your screen) and typing in 'Xcode'.Click 'Agree' to accept the License Agreement and enter your password if prompted. Watch the progress bar 'Installing components…'. When it finishes, quit Xcode. You will not need to launch Xcode again for this course.
4) Download the Qt Creator installer
The Qt Creator official download site is https://www.qt.io/download-qt-installer.When you go to this site, it should detect that your computer is running MacOS and recommend the installer 'Qt Online Installer for Mac OS'. Click the green 'Download' button to download the installer.
5) Run the Qt Creator installer
The downloaded installer is named something like qt-unified-mac-version.dmg
. Double-click to mount the disk image and launch the installer.
The graphical installer launches and walks you through a set of steps. For most steps, you can use the default settings and simply click 'Next' or 'Agree' to move on, with the following exceptions:
- At the Qt Account step, you will have to create your own Qt Account.
- At the Select Components step:
- Select the highest-numbered Qt version. For Fall Quarter 2020, the version number must be at least Qt 5.15.0. Do not select any version labeled 'Preview' or 'Alpha' or 'Beta'.
- IMPORTANT: You must also select the macOS kit component. Expand the 'Qt' triangle, then expand the triangle with Qt version number, then click the checkbox labeled 'macOS'. You can un-check every other checkbox except for 'macOS', as shown in the screenshot below.
6) Install CS106 specific components
After installing Qt, you must install the CS106-specific components and do a complete build and run cycle to confirm all is working properly.
Download CS106 project and extract
- Download this archive file: 📦 CS106.zip
- Un-zip the download contents (on a Windows computer, click 'Extract all') to a location of your choice. You should have a folder named
CS106
with several files and folders inside.
Open and configure CS106 project
A Qt Creator project includes a file named with a .pro
extension. Double-clicking the .pro
file opens the project in Qt Creator.
Find the
CS106.pro
file and open it now.- When opening a project for the first time, Qt Creator brings up a 'Configure Project' panel for you to select the appropriate build kit (see screenshot below). The default kit should already be selected; it will match the component you selected when installing Qt Creator. Accept the default by clicking the 'Configure Project' button.
- If no kits are shown as available, review the Qt install instructions. You can repeat the steps to re-install if you missed selecting the required components.
Build the program
C++ code must be compiled or built before it is run; this means converting the source code into executable binary code.
- Click the Build icon in the lower-left of the Qt Creator window.
- Watch the build progress meter in the lower-right. The first time you build a project, it can take a minute or more to compile the library code. When the bar turns green, it indicates the program successfully built.
Run the program
Now that the program is built, you are ready to run it.
- Click the Play/Run icon in lower-left of window.
As shown in the screenshot below, the welcome program prints a message to the console window and draws the Stanford logo on graphics window.
Qt Creator Macro Name Missing
✔️ Congratulations, your installation is good to go! You may now discard the CS106 project, you will not need it again.
7) Configure settings (optional)
For a better experience, we suggest changing some of the default settings, see our recommended configuration settings.
1) Ensure system is up-to-date
Before installation, ensure your macOS operating system is current. Select menu -> 'System Preferences' -> 'Software Update' and check whether any OS updates are available. If so, install them first and only then proceed with the rest of this installation guide. In order to install QtCreator, you need to have a version of MacOS that is >= 10.13. If this is not possible for you, please reach out to the course staff ASAP.
2) Install Xcode tools
Apple's developer tools are bundled as a part of Xcode. Installing Xcode provides the C++ compiler that is used by Qt Creator.
To identify the correct version of Xcode to install, you need to know which OS you are running. Go to the menu -> 'About This Mac' and read the macOS version number.
- If you are running the macOS Catalina >= 10.15, you can install Xcode directly from App Store using the instructions below.
- If your macOS is 10.14 or older, you need an older version of Xcode. In particular, MacOS 10.14 is compatible with Xcode version 11.3, and MacOS 10.13 is compatible with Xcode version 10.1. You can find older versions of Xcode at Apple Developer Downloads. Find the appropriate .xip file for your macOS version and then follow the second set of instructions below.
To install from App Store:
- Select menu - > 'App Store…'.
- Search for Xcode. Download and install.
To install from Apple Developer Downloads: - Find and download the .xip file for the appropriate version of Xcode give your macOS version. - Once the file has downloaded, unzip the archive and install XCode. - Once Xcode has installed, you must drag the XCode icon into your Applications folder. After you have done this, open Xcode from the Applications folder by double-clicking on the icon and then follow the remaining instructions below.
Xcode is a very large app, so the download and stallation will take some time, and can be anywhere from 1-4 hours depending on your network connection speed. If your computer does not have enough space for Xcode, or if the download will take prohibitively long (more than 24 hours) due to the quality of your internet connection, reach out to Nick for alternate installation instructions.
3) Run Xcode once
Qt Creator Mac Install
After downloading Xcode, you have to actually launch the Xcode application one time to install its components.You can open Xcode using Spotlight (the magnifying glass at the top right of your screen) and typing in 'Xcode'.Click 'Agree' to accept the License Agreement and enter your password if prompted. Watch the progress bar 'Installing components…'. When it finishes, you may exit Xcode and do not need to launch it ever again for this course.
4) Download the Qt Creator installer
The Qt Creator official download site is https://www.qt.io/download-qt-installer.When you go to this site, it should detect that your computer is running MacOS and recommend the installer 'Qt Online Installer for Mac OS'. Click the green 'Download' button to download the installer.
5) Run the Qt Creator installer
The downloaded installer is named something like qt-unified-mac-version.dmg
. Double-click to mount the disk image and launch the installer..
The graphical installer launches and walks you through a set of steps. For most steps, you can use the default settings and simply click 'Next' or 'Agree' to move on, with the following exceptions:
- At the Qt Account step, you will have to create your own Qt Account.
- At the Select Components step:
- Select the highest-numbered Qt version. As of June 17, the latest release is Qt 5.15.0. Do not select any version labeled 'Preview' or 'Alpha' or 'Beta'.
- IMPORTANT: You must also select the macOS kit component. Expand the 'Qt' triangle, then expand the triangle with Qt version number, then click the checkbox labeled 'macOS'. If you are tight on disk space, you can un-check every other checkbox except for 'macOS', as shown in the screenshot below.
6) Confirm installation
IMPORTANT: Follow the check step instructions to build and run our sample project that confirm your Qt Creator is installed properly and works correctly.
7) Configure settings (optional)
For a better experience, we suggest changing some of the default settings, see our recommended configuration settings.