Hacking:Tools:QtCreator:Windows10
About this page
This page contains steps to:
- Install Qt 5.8 on 64-bit 4-processor desktop with Windows 10. Note that Qt 5.8 contains Qt Creator 4.2.0
- Configure Qt Creator with:
- custom compiler
- custom compiler kit
- system environment library variables
- Configure Valentina project in Qt Creator to:
- compile with custom compiler kit
- compile for Release or Debug
Qt Framework and Qt Creator are built to work with 32-bit MinGW (Minimalist GNU C/C++ compiler for Windows). There are projects which have built Qt using the 64-bit MinGW compiler, but these don't seem to be kept up to date. And they may produce unexpected results for Valentina.
Qt Creator's configuration includes definitions for a compiler, compiler kit, and library paths.
Additional build/compiler/environment options can be customized for each project.
Note: The library paths are sometimes required to enable libraries to be found during qmake when compiling Valentina code.
Install Qt 5.8
Create a Qt account at https://account.qt.io/, then login.
Go to https://www.qt.io/download-open-source/ and click on the Download button. The correct file to download for your operating system will be downloaded, in this case the file qt-unified-windows-x86-2.0.4-online was downloaded..
Open your Downloads folder, right click on the file, and select Run as administrator. Follow the install instructions.
During installation you may accept the defaults for components to install, or you may select what you need but do not change any options for MinGW. . In this case I deselected all Qt versions except 5.8. Under the Tools section QtCreator is unselectable -- it will always be installed.
Confirm C++ compiler and qmake directories
Open Qt Creator and open Tools/Options/Build & Run.
Select the Compilers tab. Note the directory for the C++ compiler.
Select the Qt Version tab. Note the directory for qmake.
![](http://static.miraheze.org/seamlywiki/thumb/7/79/QtToolsOptionsBuild%26Run.png/300px-QtToolsOptionsBuild%26Run.png)
Confirm kit
Select the Kits tab.
The Auto-detected kit should be Desktop Qt 5.8 MinGW 32bit (default).
Configure the Valentina project
Select the General tab.
In the Directory field, select the directory containing your local clone of Valentina, or if you have multiple Qt projects select the parent directory of your projects.
Check the Open Compile Output pane when building option, leave all other options at default settings.
Click Apply and OK to close the Tools/Options window.
Click Open Project button.
Select the Valentina file from your local clone of Valentina.
The Configure Project window opens. Click the Configure Project button.
Click on the Projects wrench icon in the left side menu.
Select the Build hammer icon to open the Build Settings options.
Next to Edit Build Configuration, select Debug from the picklis
t.
Click on the Details button for the Make instruction under Build Steps.
Enter -j2 in the Make Arguments field to enable use of multiple processors.
Go back to Edit Build Configuration, select Release, and enter -j2 in Make Arguments.
![](http://static.miraheze.org/seamlywiki/thumb/a/a3/Projectbuildsettings.png/300px-Projectbuildsettings.png)
Select the Run green triangle icon to open the Run Settings options.
Next to Run Configuration select valentina from the picklist.
![](http://static.miraheze.org/seamlywiki/thumb/5/5f/QtProjectRunSettings.png/300px-QtProjectRunSettings.png)
Save configuration and build Valentina
Select File from the main top bar menu and select Save All.
From the Build menu option, select Run qmake followed by Build Valentina.
Subsequent builds require Clean Project Valentina, Run qmake, Rebuild Project Valentina.
Now smile and relax, you're done!!!!!!!!!