Qt was messing up on Windows so I deleted it and re installed it with the qt libraries and Qt Creator. Now, whenever I try to open my old project, I get the error that "Qmake is does not exist or is not executable", and none of the Qt headers can be located.
Assuming you're using a recent version of Qt, such as version 4.7.4, and a recent version of Qt Creator, such as the branch 2.3 .*.
Probably somewhere in this process, Qt Creator or the settings for this specific project lost the reference to Qt install.
We first need to find out if Qt Creator knows where Qt is installed. Go to Tools > Options.... Then click in Qt4. Here will show all installed and detected Qt versions.
As you can see, I have one Qt version installed (4.7.4), which was automatically detected.
If you do not have any installed version, you need to indicate a one manually. Simply click Add and point it to the right qmake.exe. Use the paths of the figure as reference. If you are developing a windows/mingw application, just need to add the qmake.exe associated with mingw (c:\qtsdk\desktop\qt\4.7.4\mingw\bin\qmake.exe on my computer) and remember the Version name, we'll need that in next step.
After that, open the project and click on Projects in the lateral bar. You need to Substitute the Qt version. Click on Manage next to it and select the correct version. This should resolve the problem.
Any trouble just comment. Sorry about the creepy english.
Related
Want to manually install 32-bit versions of Qt 5.7 so that I will be able to deploy my app to not only 32-bit but 64-bit machines as well.
Initially when I installed it on my 64-bit Windows 7 machine, I only selected the 64-bit components and, hence, I can only select the MSVC2015_64 bit kits in Qt Creator to build my app with.
Since I want to deploy my app to a 32-bit Windows 10 machine, I am trying to add the 32-bit Qt versions to my installation; tried through Tools > Options > Build & Run > Add... with no success. Searched for some answer/guide to the documentation and to other online sources but could not find how to achieve this in Windows.
Is it possible to manually add other Qt versions on a current install or is do I have to reinstall Qt? Also, could I simple install Qt with the desired Qt versions on a different directory than the first installation or will that mess up the PATH variables?
You have to launch Qt Maintenance Tool : Start -> Programs -> Qt -> Qt Maintenance Tool.
Skip the Qt login (unless you are using a commercial version of Qt).
Select "Add or remove components" and click yes. You'll be able to select other kits to download and install*.
Then Qt Creator should automatically add those kits, you'll just have to add them to your project : go to project settings once your project is open, and you'll find "Add kit" button in the upper left corner.
*Qt Maintenance Tool may prompt you to update components first if there's a new version available.
Kits are the key to your problem. A kit in Qt is composed of:
Version of Qt (and i'm not talking about Qt creator)
Compiler (you have to choose the correct compiler corresponding to your Qt Version, i will explain that more in detail, below )
Debugger (correct version 32 or 64 bits).
You can install as many versions of Qt as you wish Qt Creator will usually autodetect them all. Don't worry it won't damage your path, you can also install 2 different compilers (MingW and MSVC a.k.a VS compiler for example).
in Qt site : https://www.qt.io/download-open-source/
pick the version or versions of Qt you want to install and install them (the package include Qt Creator so no need to install it twice)
you also download the correct version of your compilers and debbuggers (if you don't already have them) and install them.
Once you've downloaded all the components and installed them, you go to Qt Creator :
Tools -> Options
in the lhs menu select Build & Run
you can go and check Qt Versions, Compiler and debugger to see if everything was auto-detected well.
if it's ok you can then create your kit :
go to the kits Tab
you can either add a new kit, but i prefer cloning an existing one and then edit it.
select the clone and choose the correct compiler, the correct version of Qt and the correct Debugger, rename your kit so you can recognize it. Save and close.
to use the kit you created you have to choose it in the project menu
see the screenshot below :
you can create as many kits as you wish, so you can have different configurations.
QtCreator can handle any number of "kits", where a kit is a combination of compiler + Qt version + (optionally) a deployment target.
See http://doc.qt.io/qtcreator/creator-configuring.html
I should have asked this question before asking this
I am creating a QT app (on MAC) that should use frameworks compiled from qt-everywhere-opensource-src-5.5.1.tgz and not the one that comes with qt-opensource-mac-x64-clang-5.5.0.dmg.
I use QT creator installed by that DMG file and qmake in it somehow links with the frameworks installed by this DMG. (see this for more details)
Whats the legit way of making this QT creator use other framework.
Qt Creator has the concept of build Kits. A kit includes (among other things) a compiler, debugger and Qt version. In the Qt Creator preferences, go to the Build & Run section. Under the Qt Versions tab, ensure that your Qt 5.5.1 built from source is listed there. Then go to the Kits tab and either create a new kit or modify an existing one. Ensure that kit is using your Qt 5.5.1 version.
Once you've got that sorted out, a project can have one or more kits associated with it. From the main window, go to the Projects panel. Near the top of the Build & Run tab of the projects page will be the section where you select the kit(s) for the project. Ensure your project is using the kit you created/modified which uses your Qt 5.5.1. That should be enough to get your project building with your version of Qt instead of the one that comes with Qt Creator. To be absolutely sure, perhaps delete any previous build before you switch kits or even better, create a new build configuration in a new build/output directory for it.
There is an Example tab at the Qt Creator(2.6.1)'s Welcome page, which is supposed to show the already made Qt Project Examples. But whenever I click on that, Qt creator closes automatically. Sometimes it shows the Example projects for 1 or 2 seconds and the exits. Any idea?
You probably need to configure Qt Creator to find your Qt installation.
Compiler configuration for Qt Creator
And you might need to get the msvs compiler, too.
http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products
They now have the mingw version available for windows with Qt 5.0.2.
http://qt-project.org/downloads
Also if you installed Qt without the examples that may also cause this error.
Hope that helps.
My goal is to be working on / debugging qt creator plugins and, maybe, editing / debugging qt creator source code. Towards this end I've tried a couple of things:
Downloading source for the qt sdk and qt creator, compiling each, and then making a qt creator plugin project and hooking everything together by hand. This got complicated pretty quickly (I tried to keep my plugin project outside the qt-creator/src/plugin/ folder) and doesn't really get me to a nice spot in terms of debugging.
Using an installed version of the qt creator to open the qtcreator.pro that came along with the source, adding a qt creator plugin as a sub project, and building everything from the already installed version of qt creator.
I like the second approach a lot because I have control over everything but I can rely on qt creators tools that make projects, enhance debugging, etc. There's just one small problem...
When I run my shiny new build of qt creator (with my plugin project) from inside the installed version all I get is a popup called "qtcreator_process_stub" that says "This is an internal helper of Qt Creator. Do not run it manually. Press to close this window..."
So I'm not really sure how to debug my build of qt creator from my instance of qt creator. Any ideas? Note: if I run the generated Qt Creator.app I get a functioning instance of qt creator with my plugin loaded properly.
I believe this was a versioning problem. I had an older version of the ide installed and was using it to build and debug a newer version of the ide.
I was able, in the older ide, to launch and debug the new ide as an external process through the debug menu... but that was mildly annoying.
Once I installed a new version of the ide I was able to debug like normal.
I have multiple installations of Qt4 on my Windows XP SP2 machine and have installed Qt Creator 2.1 today. However, running the project (.pro) files spawns the oldest version of Qt Designer installed (the one installed in 2009 together with the rest of the framework).
Since
I would not like to remove any previous installations of Qt
and for some obscure reason even if I explicitly ask Windows Explorer to always use the version I need it does not
I would like to give up a bit and just sript the needed behaviour in a .bat file like:
e:\path\to\qtcreator.exe %1
This opens Qt Creator, but something seems to prevent it from treating the .pro file properly (in short, the project does not "open" as it should).
Qt documents have a page on the matter at Qt Creator: Using Command Line Options, but it seems to ignore the topic in question.
Since Qt (being as excellent framework as it is) is also known to have its quirks (like that of qmake), I wonder, may be there is an undocumented way to solve my problem?
(Another way to fix the thing would of course be to make the correct version of Qt Designer run, but frankly I'd prefer the "hard-wired" solution since the mechanisms provided by Qt itself are still a bit unreliable.)
The libraries and tools used for a particular project (and a configuration in it) is set in the Projects panel in Qt Creator:
http://doc.qt.io/qtcreator/creator-build-settings.html
Selecting the Qt version to use with a project should force it to run the Designer that's part of the version. If it doesn't, then you should report it as a bug.