Debugging a version of Qt Creator and plugins all built from source - qt

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.

Related

Qt5.5.1: How to create QT application that uses frameworks generated from qt-everywhere-opensource-src

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.

Qt Creator crashes loading Examples

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.

Installing Qt Creator with MinGW

So it looks like with Digia taking Qt over from Nokia, that it's quite a mess to get a few simple downloads.
If I now go to the downloads page (http://qt-project.org/downloads), I see that there's a single Qt Creator 2.6.2 download for Windows. When I download this and run the installation, it seems that MinGW is no longer packaged along with it.
I tried to install MinGW 4.4 separately and then add a toolchain, but nothing runs when I try to compile my CMake-based project.
I then came across the Nokia website that is offering Qt SDK 1.2.1; however it now looks that they require you to create an account to be able to download the installer.
Downloading the full set of Qt libraries is probably what is going to be suggested, but that's not the best idea, because I'm basically writing up an installation procedure for a CMake-based, open-source set of libraries that I've been working on for a while (http://tudat.tudelft.nl).
Users aren't happy with having to download all the Qt libraries, since we're not using any of them.
I've completely run out of solutions now (and mind you, this only seems to be a problem for Windows, since when I install Qt Creator on Linux and Mac, GCC auto-detection seems to work fine).
So, in short, does someone have a simple install routine to install Qt Creator and get it to work with MinGW to compile a CMake-based project?
Thanks in advance!
Kartik
PS: I know there are plenty of threads on Qt Creator + MinGW, but they all seem to be outdated now with the recent changes on both the Digia and Nokia websites.
I should add that the problem specifically is not that the toolchains can't be auto-detected under Windows. I've managed to get both MinGW and CMake auto-detected by Qt Creator by adding both to the system path. The problem is that when I then try to open the CMakeLists.txt file for my project, I can't select any generators.
Straight forward:
Install Qt Framework
Install MinGw
Install CMake
Install other stuff, e.g. git
Install Qt Creator
As you already mentioned, the chances are good that Qt Creator gets everything via auto detect. Nevertheless, you should check the Qt settings if everything is in place, e.g. the debugger.
The first time you open a cmake project, Qt Creator (should) ask for the tool chain to use. If you want to change the chain afterwards, delete the build files and cmake directories.
More details to Qt Creator and cmake: http://qt-project.org/doc/qtcreator-2.7/creator-project-cmake.html

Qt Include and QMake error

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.

Is Qt Creator built with Qt Creator?

Questions:
Is Qt Creator built with Qt Creator?
Similarly, is Qt Designer built with Qt Designer?
BTW, why are there two Qt IDEs? Are they competitors? Which one should I use? I am using Creator.
What is Qt SDK? I am asking this because the Qt Designer & Creator 2.2.1 and Qtmake 4.7.4 that I installed thro ubuntu 11.10 s/w centre does not work. The build menu is all greyed out.
When I downloaded the latest QtSDK (2.3.1/4.7.4) into a separate installation into /opt/QtSDK, both the ubuntu sanctioned installation and the /opt/QtSDK would work as expected.
Why did my ubuntu sanctioned installation not work without the SDK? What does the SDK do?
This one is for Ubuntu enthusiasts - Qt IDE requires the SDK to work, and yet ubuntu released both Creator/Designer without checking if they work first? There is no QtSDK installation item in s/w centre. Is that intentional, or a procedural bug?
After I build my desktop app (I am building a tabbed file explorer) on Linux, what steps do I need to make to have it running on Windows 7/Vista? Will I rebuild on a windows version of Qt Creator?
I also notice that Qt Creator code generation is not perfect. It would forget to include some Qt library files in the auto-generated code, and I had to correct that manually.
Is Qt Creator built with Qt Creator?
I believe so.
That doesn't mean that everyone who works on Qt has to use it - just that I believe that lots of people do.
I don't work for any of the companies that have produced Qt, but my reasoning is:
A Google search for "dogfooding qt creator" brings up plenty of hits, including this comment from November 2010:
We’re also “dogfooding” by releasing complex apps like Qt Creator and the Ovi Suite on the desktop ports of Qt
They've put a massive amount of effort into Qt Creator over the last few years. It's hard to imagine that being worthwhile, unless they used it themselves
At recent Qt Developer Days, Qt Developers have spoken really enthusiastically about Qt Creator
Similarly, is Qt Designer built with Qt Designer?
Yes. A look at the Qt Designer source code shows plenty of .ui (Designer) files.
Why are there two Qt IDEs? Are they competitors? Which one should I use? I am using Creator.
When you edit .ui files insiide Qt Creator, you are still running Qt Designer: it's simply showing the Designer window inside Creator, for convenience.
What is Qt SDK? ... What does the SDK do?
Qt SDK is just a convenient way to download all the Qt tools in one go. You don't have to use it.
This one is for Ubuntu enthusiasts ... Is that intentional, or a procedural bug?
Sorry - no idea. It's hard to imagine it being intentional though.
After I build my desktop app (I am building a tabbed file explorer) on Linux, what steps do I need to make to have it running on Windows 7/Vista? Will I rebuild on a windows version of Qt Creator?
You will need to install Qt on a Windows PC, and then build your source code in it.
You can either do that by using Qt Creator and the Windows compiler it includes (mingw) or you can use another compiler, if you have one, e.g. Visual Studio.
I also notice that Qt Creator code generation is not perfect. It would forget to include some Qt library files in the auto-generated code, and I had to correct that manually.
If you've used any non-Qt classes in arguments to signals and slots, then this answer may help you there.

Resources