Qt Creator Installation - Windows

Download and install Java Development Kit (JDK)

Go to Oracle's Java JDK download page. On that page, under the heading labeled "Java SE Development Kit 10.0.2", click the button to Accept the license agreement, then click the Windows x64 link (it should be the last one in the list) to download the appropriate installer for your operating system. You don't need to download the "Demos and Samples Downloads" link. Once you have downloaded the Java JDK installer .exe file, double-click it to run it, which will install JDK on your computer. You can choose all default options during the installation.

(Yes, you do need to do this. Even though this course is in C++, our libraries also require Java to function properly.)

Download and install Qt Creator

  1. Download the installer:Go to the Qt Creator official download site to download this software. Choose Recommended download: Qt Online Installer for Windows and click the Download button at the bottom of the page. Your download will begin.
  2. Launch the installer:Once you have downloaded the Qt Creator .exe installer, double-click it to run it and launch the enclosed installer application, which will install Qt Creator on your computer. For most of the screens, you can just click "Next" to move to the next option, with the following exceptions.
    • At the "Registration" screen, you can press "Skip" to skip the registration step.
    • At the "Select Components" screen, do not choose to install any versions that are labeled "Alpha" or "Beta" or "Preview."
    • (IMPORTANT) At the "Select Components" screen, you must install the MinGW Component: To do this, expand the "Qt" triangle, then expand the "Qt 5.11.2" triangle, and then click the checkbox labeled, "MinGW 5.x.x 32 bit". See the screenshot below.

      This is absolutely crucial; if you forget to do this, your computer will not be able to compile and run C++ programs.

      screenshot

    • For all subsequent screens, you can just press "Next" or "Agree" or "Install" to finish the installation.
    • When the installation finishes, click "Finish" to launch Qt Creator.

Try to compile/run a sample project

Let's make sure that all the parts are working together properly by building and running a sample Qt Creator project that uses the Stanford C++ libraries. The Stanford C++ libraries also interact with Java, so if this project runs properly for you, then you will be sure that your Qt Creator and Java JDK are both set up properly. Here's what to do:

  • Download the following project ZIP file to your computer.
  • Un-zip the file's contents to a directory of your choice. You should have a directory named sample-project with several files and folders inside.
  • Open the project. In Qt Creator, choose "File" → "Open File or Project..." or press Ctrl+O (or Command+O on Mac). Navigate to the sample-project folder and open the file sample-project.pro.
  • Qt Creator will ask you a few questions about how to set up the build process for this project. You can just accept the defaults and click "Configure Project".

    screenshot

  • Build it. Now you should be able to Build (Ctrl+B or Command+B) your project in Qt Creator. If it builds properly, your C++ compiler and the Stanford C++ libraries are at least compiling properly. The first time you build a given project, it will take a while (30-60 sec or more) to compile all of the various libraries. You can click the bottom "4 Compile Output" tab if you want to see the progress as it is compiling. (Recommended: In Qt Creator, click Tools → Options → Build & Run, and check the box labeled "Open Compile Output pane when building" to always see this output during compilation.)
  • Run it. Now that it's built, you should be able to Run (Ctrl+R or Command+R) your sample-project. This is the part where Java is needed, so if your Java isn't properly installed, this is probably where it will fail. If it runs properly, you will see a window appear with a smiley face. Congratulations, you're done! Now your machine should work just fine for working on our homework assignments.

    screenshot

If you encounter any problems during your attempt to compile and run the sample project, check out our Qt Creator troubleshooting page. Otherwise, congratulations; you're done!

This document and its content are copyright © Marty Stepp and Julie Zelenski, 2019. All rights reserved. Any redistribution, reproduction, transmission, or storage of part or all of the contents in any form is prohibited without the authors' expressed written permission.