Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt Creator and Qt 4.8 libs
I am doing a university course that is based on Qt 4. However the only combined Qt Creator / Qt Libs package is for version 5. I read in the forums and wiki that I should download the Qt libs 4 package and the Qt creator installs, then install the libs first, followed by the Qt creator. The posts generally say that Qt creator will "find" my version 4 libs and all will be fine
I have tried this a couple of times now, installing Qt 4 Libs, and then running the Qt creator install, but at no point in the Qt Creator install process does it ask where the Qt 4 libs are.
After the Qt Creator install, none of the create templates are available, and it cant compile my code etc. How do I configure Qt creator to use the Qt 4 libs?
Thanks in advance.
Hi and welcome to DevNet,
Options(Preferencess depending on your platform) -> Build&Run -> Qt Versions
Add your Qt4
Then -> Kits
Make one using your newly available Qt4
Hope it helps
b1gsnak3 last edited by
Also, if you are using Windows, you must have Microsoft Visual Studio installed or MinGW. You must choose your libraries according to what compiler you use (MSVC or MinGW). For MSVC you have 2 options: 2008 or 2010 (not sure if you can use Qt 4 with MSVC 2012). Best of luck on your course
I have installed Qt Creator 2.7.
I have selected Tools | Options |Build & Run
I select Qt Versions, add and point the file browser to my qmake.exe in the qt4 install folder.
I then get an error saying that this is an invalid Qt version (Qt 4.8.4). It suggests that I run make install. (I am on windows not linux)
Do I need an earlier version of Qt Creator for Qt libs 4.8.4?
What is the exact error message ?
Please let me review what I have done so far.
- I am running on windows xp
- Yesterday I downloaded MinGW and installed it.
- I then tried to install Qt Libs 4.8.4 for MinGW.
- This fails on the step to locate and use my MinGW, and the error is
There is a problem with your MinGW installation:
The installer could not find a valid C:\MinGW\include\w32api.h
(Only versions with W32API 3.13 are supported)
So in this case I never got to the point of installing Qt Creator.
Today I have tried the other option which is the VS 2008 option.
- I have installed Visual Studio 2008.
- I then install Qt libs 4.84 (VS 2008) without errors.
- I then install Qt Creator 2.7, but it never asks me where my Qt libs are installed, or where the VS 2008 is installed. There are no errors while installing Qt Creator.
I then open Qt Creator, click "File" | "New File or Project" but the "Choose Template" dialogue has none of the Qt project templates, and if I create a new C++ file it wont compile.
I tried to follow your suggestion to configure Qt libs, I add an entry on the "Build & Run" | "Qt Versions" dialogue, that points to the location of my Qt libs install folder/qmake. It has a red icon with an exclamation mark. Lower down on the dialogue it says "Qt version is not properly installed, please run make install".
Under the compilers section I can see 2 Microsoft Visual C++ Compilers (10.0 x86 Type MSVC)
It's normal that it's not detected, don't worry about that.
For the mingw part: if you download the setup from qt-project, it comes with a mingw (IIRC) so it's better not to have multiple mingw installed, they are generally not binary compatible and don't play nice together. Use the one provided with Qt.
For the MSVC part: check that your version of Visual Studio has the same patches (i.e. SP1) than the one used to build Qt (or build Qt from source using a visual studio command prompt)
You can try to switch between compilers to see if one is suited. If not, update Visual Studio (windows update should do the job)
Hope it helps