1) Download 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 Windows and recommend the installer "Qt Online Installer for Windows". Click the green "Download" button to download the installer.
2) Run installer
The downloaded installer is named something like qt-unified-windows-version.exe
. Double-click to run it.
The installer 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 that starts with 5.x.x. For Summer Quarter 2021, the version number must be at least Qt 5.15.0. Do not select any version labeled "Preview" or "Alpha" or "Beta". Do not select any version that starts with 6.x.x.
- IMPORTANT: You must also select the MinGW 32-bit kit component. Expand the "Qt" triangle, then expand the triangle with Qt version number, then click the checkbox labeled "MinGW 8.x.x 32 bit". You can un-check every other checkbox except for "MinGW 32 bit", as shown in the screenshot below.
This screenshot shows selecting the Mingw 32 component. Note that we scribbled out the version numbers to avoid confusion since the versions change frequently.
3) 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.- If your File Explorer options are set to hide filename extensions, the file
CS106.pro
will display the nameCS106
. You can change whether extensions are displayed in File Explorer by choosing menu item File->Options, select the "View" tab and under “Advanced settings”, uncheck "Hide extensions for known file types". Click "Apply" button.
- If your File Explorer options are set to hide filename extensions, the file
- 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.
✔️ Congratulations, your installation is good to go! You may now discard the CS106 project, you will not need it again.
4) Configure settings (optional)
For a better experience, we suggest changing some of the default settings, see our recommended configuration settings.