Difficulty with default Qt Creator configuration for Qt 6.4
-
I just downloaded Qt 6.4 and ran into an immediate configuration issue with Qt Creator. While I was able to fix the issue, it will recur for each new project I open unless I can figure out the original source of the difficulty.
Following this brief summary of this experience, I have a couple of specific questions.
Immediately after installing Qt 6.4, I opened the QML "texteditor" example project:
C:\Qt-6.4\Examples\Qt-6.4.0\quickcontrols2\texteditor\texteditor.pro
I selected the option to configure for kit "Desktop_Qt_6_4_0_MinGW_64_bit-Debug"
Immediately, the following error was reported - "No CMake configuration found!"
I presume that referred to CMakeLists.txt, which definitely did exist. M\However, my first instinct was to look at the configuration options for the project, where I discovered that "Build directory" had been set to
C:\Qt-6.4\Examples\Qt-6.4.0\quickcontrols2\texteditor\Desktop_Qt_6_4_0_MinGW_64_bit-Debug")}
The trailing characters ")} seemed wrong, so I deleted them, after which the the project configured and compiled correctly. I do not know how fixing the "Build director" fixed the "Cmake configuration" problem.
The specific questions:
-
How are default configuration parameters, such as the "Build director" set in Creator?
-
Does some sort of master configuration file exist that I could look at? There are quite lot of configuration parameters, and you need to explore quite a number of configuration screens to check them all. It would be really convenient if I could find some sort of "master list" to let me know what the are and how they are set.
Any suggestion appreciated.
-
-
@drmhkelley said in Difficulty with default Qt Creator configuration for Qt 6.4:
Immediately after installing Qt 6.4, I opened the QML "texteditor" example project:
C:\Qt-6.4\Examples\Qt-6.4.0\quickcontrols2\texteditor\texteditor.pro(This part is not related to your problem, but it's worth discussing given what you expressed at https://forum.qt.io/topic/139772/re-compiling-cached-qml-components/ )
The Qt installer can install multiple versions of Qt to
C:\Qt\
by default. Installing toC:\Qt-6.4\
doesn't make sense if you want to manage multiple versions of Qt on your machine. What you want is this folder structure:C:\Qt\5.15.2\
C:\Qt\6.4.0\
C:\Qt\Tools\QtCreator\
C:\Qt\MaintenanceTool.exe
MaintenanceTool.exe re-runs the installer, allowing you to add/remove Qt versions.
(IIRC, you now need to enable "Archive" when selecting components if you want to add Qt 5.15)
"Build directory" had been set to
C:\Qt-6.4\Examples\Qt-6.4.0\quickcontrols2\texteditor\Desktop_Qt_6_4_0_MinGW_64_bit-Debug")}That looks very wrong. Does it still occur if you restart Qt Creator and open a new project?
The specific questions:
- How are default configuration parameters, such as the "Build director" set in Creator?
- Does some sort of master configuration file exist that I could look at? There are quite lot of configuration parameters, and you need to explore quite a number of configuration screens to check them all. It would be really convenient if I could find some sort of "master list" to let me know what the are and how they are set.
To answer your question, the configuration you're asking about is at Edit > Preferences... > Build & Run > Default Build Properties. However, you should never need to touch this setting.
-
@JKSH said in Difficulty with default Qt Creator configuration for Qt 6.4:
The Qt installer can install multiple versions of Qt to
C:\Qt\
by default. Installing toC:\Qt-6.4\
doesn't make sense if you want to manage multiple versions of Qt on your machine. What you want is this folder structure:C:\Qt\5.15.2\
C:\Qt\6.4.0\
C:\Qt\Tools\QtCreator\
C:\Qt\MaintenanceTool.exe
Well, don't I feel foolish - seems like no real progress can be made within Qt without a requisite succession of such reminders.
In the past, whenever I ran the online installer, I just selected the version I wanted to install, but never as a customized installation - didn't want to customize anything, just wanted the default installation. Of course, the installer would always refuse to continue because c:\Qt already had something installed in it - had to either delete that existing installation or create a new folder with a different name in order to proceed. Sure would have saved a lot of time for idiots like me if there had been some little hint about creating a custom installation even if you don't want to customize it.
Well, at least that problem is now behind me ...
"Build directory" had been set to
C:\Qt-6.4\Examples\Qt-6.4.0\quickcontrols2\texteditor\Desktop_Qt_6_4_0_MinGW_64_bit-Debug")}That looks very wrong. Does it still occur if you restart Qt Creator and open a new project?
Yes, it did - for each new example I built. Hence, my question about where it was set what sorts of configuration files exist. I was able (as I described) to do a temporary fix for each new example or project, but the problem would have persisted indefinitely unless I found a real solution.
Lacking any other suggestions, I just deleted the various folders named "Qtxxx" in the AppData folder. Apparently, reinstalling Qt from scratch doesn't remove all of its hidden fingerprints.
However, after deleting those AppData folders and reinstalling as a custom installation, that specific weirdness was corrected.
To answer your question, the configuration you're asking about is at
Edit > Preferences... > Build & Run > Default Build Properties.
However, you should never need to touch this setting.Well, I probably need to touch it at least once, unless there is another hidden procedure for dealing with a related unpleasantness.
In my current "default" installation, the Build Directory is set to:
../%{JS: Util.asciify("build-%{Project:Name}-%{Kit:FileSystemName}-%{BuildConfig:Name}")}The example project texteditor, which resides in
C:\Qt\Examples\Qt-6.4.0\quickcontrols2\texteditor\texteditor.pro
The project builds correctly and is placed in
C:\Qt\Examples\Qt-6.4.0\quickcontrols2\build-texteditor-Desktop_Qt_6_4_0_MinGW_64_bit-Debug
One natural consequence of this default setting is the following. Suppose I am maintaining several different projects, say projects 1-4 in folder .../src. My source tree might look something like
.../src/project1/project1.pro
.../src/project2/project2.pro
.../src/project3/project3.pro
.../src/project4/project4.proAfter building each project, the source tree becomes
.../src/project1
.../src/project2
.../src/project3
.../src/project4
.../src/build-project1-Desktop_Qt_6_4_0_MinGW_64_bit-Debug
.../src/build-project1-Desktop_Qt_6_4_0_MinGW_64_bit-Release
.../src/build-project2-Desktop_Qt_6_4_0_MinGW_64_bit-Debug
.../src/build-project2-Desktop_Qt_6_4_0_MinGW_64_bit-Release
.../src/build-project3-Desktop_Qt_6_4_0_MinGW_64_bit-Debug
.../src/build-project3-Desktop_Qt_6_4_0_MinGW_64_bit-Release
.../src/build-project4-Desktop_Qt_6_4_0_MinGW_64_bit-Debug
.../src/build-project4-Desktop_Qt_6_4_0_MinGW_64_bit-ReleaseIn fact, I maintain a few dozen projects and I find the subsequent folder tree to be completely unacceptable.
Thank you very much for confirming for me the appropriate place to implement that change.
At this point, I am comfortable assuming that my issues have all been appropriately resolved.