Qt Creator and the Stanford Library
In this tutorial we will install the IDE QtCreator
which will help you
write your first code in C++. Occasionally, we also use the Stanford
library for some interactive homework.
Qt Installation
1) Download Qt Inline installer
The official QT creator page is in the https://www.qt.io/download-qt-installer. Visit the website, it will detect automatically your platform ( windows or mac ). According to this, it will present the correct binary to download.
2) Run the installer
Selon votre système d’exploitation, vous devez lancer l’exécutable qui est la forme suivante:
Run the installer for your system:
qt-unified-linux-online-run
for Linux.qt-unified-windows-version.exe
: for Windows.qt-unified-macOs-online.dmg
: for Mac Os.
Launch you installation and be careful about the following points:
- Don’t install the version 6 of Qt.
- Take the highest version with the fifth major number Qt.5.xx.0.
- The only needed component is MinGW8.xx..32 bit
This is illustrated in the following figure:
3) Stanford Library
This step is optional but could be careful for some projects with some graphics. We will install the C++ Stanford library.
-
Download the declarations of the library CS106.zip
- Unzip the content in a folder named CS106.
- You’ll find a folder with two projects:
- Welcome : simple project to test your installation.
- Library : The main components of the library.
3.1) Library
Open the project configuration file Library.pro
with Qt Creator.
Accept the options for the configurations as showed in the figure:
Once the project is opened, you can launch the configuration process:
4.1) Sample project
Once the compilation of the library is finished, you can open the second project in Welcome.pro
- Compile the project.
If you encounter an error. This means that the first step was not completed.
- Execute the project.
You’ll a terminal window asking you to enter your name:
- Once you entered your name, you’ll see it with the Stanford logo:
Congratulation you just finished configuration of you IDE.