How to configure Qt
-
Hi,
How do I install/configure Qt? I'm been trying to configure for about 3 months, I know I'll get it someday. Qt was able to find minGW/GCC but it doesn't let me use it. It looks like the installer is installing the wrong "flavor" of Qt, ie, based on MSVC. So it seems like it's looking for a microsoft compiler(?). Can I point it to minGW C++ compiler?Qt Creator 3.6.0
Based on Qt 5.5.1 (MSVC 2013, 32 bit).I'm not using MS Visual Studio, is that related to MSVC?
I know I'll get it one of these days! Just need to tell Qt whay I want to do.
thank you. -
@pi_in_the_sky Looking at some more posts, I think my question is:
How do I install the MinGW build of Qt? It looks like it default to MSVC build. Is there a way to tell it not to do that? -
Use the online installer. It's the easiest way.
In the components tree select only these items and uncheck everything else:- Tools -> MinGW 4.9.2
- Qt -> Qt 5.5 -> MinGW 4.9.2 32 bit
That's it.
@pi_in_the_sky
Qt Creator 3.6.0 Based on Qt 5.5.1 (MSVC 2013, 32 bit).That's fine. It doesn't matter what it says in the about window. It's the Qt version used to build Qt Creator itself (it's a Qt based app too after all). The precompiled binaries are built using MSVC, but this has nothing to do with Qt version used in your own projects.
The version you use in the project is set up in Qt Creator in Tools -> Options -> Build & Run
-
@Chris-Kawa Thank you for your response. I do not understand what you're talking about.
I do not see a tree to select components.
I don't understand the difference between Qt and Qt Creator.
The steps I took were:- Download and ran qt-unified-windows-x86-2.0.2-2-online.exe
This installed the Qt Creator "based" on ("built" for?) MSVC. - Uninstalled above.
- Downloaded and ran qt-opensource-windows-x86-mingw492-5.5.1.exe.
This looks like it installed its own version of minGW g++ and configured itself to point to it. So, it works now.
Hard to tell what's going on under the hood, but it seems to be working now. thank you.
- Download and ran qt-unified-windows-x86-2.0.2-2-online.exe
-
I do not understand what you're talking about. I do not see a tree to select components.
When you start the installer I linked you get to a screen that looks like this:
This is the list of components I was talking about.I don't understand the difference between Qt and Qt Creator.
"Qt" is a programming library. Like STL or Boost.
"Qt Creator" is an app. An editor (or IDE) that helps you write programs. Like Notepad or Visual Studio.This installed the Qt Creator "based" on ("built" for?) MSVC.
No. This installed Qt Creator, an application that was written in C++ and compiled with MSVC. "Based on" means "compiled using" not "meant to compile other programs with".
Hard to tell what's going on under the hood
There's not much hood to look under. When creating a c++ application you usually have: your source code, some libraries you link to, a compiler, a linker, a debugger and some editor that you use to make using all of these together easier.
In your case:
- the editor is Qt Creator
- compiler and linker is GCC, debugger is GDB, these are part of a package called MinGW
- you link to a library called Qt
- source code is, well, your code
-
oh! OK, I get it now. thank you for clarifying! I didn't know I could expand the tree in the setup gui. That explains everything. Thanks again for the detailed explanation so that even I can understand it!