How to debug Qt installation problem?
-
I have installed Qt Creator 3.0.1 on two Macs, both running OS X 10.9.2.
On one of the Macs (a new machine with very little software installed) Qt Creator works perfectly, but on the other Mac (a few years old, with some software previously installed) Qt Creator has a lot of problems. For example, it is not possible to create a Dialog-based Applicaton.
If I go to New Project > Qt Widgets Application > (select location), check "Desktop Qt 5.2.1 clang 64bit" > Class Information, under "Base Class", you are supposed to be able to pick QMainWindow, QWidget or QDialog, but only WMainWindow is shown, the Base Class selector widget is inoperable.
There are similar problems in the Preferences... dialog, so I am guessing Qt Creator uses Qt for its user interface, and there might be a conflict with another Qt library from some other software that is already installed.
How would I go about debugging this kind of setup conflict?
-
Hi, perhaps you've got hit by the "double Qt runtime syndrome".
To check, start that Qt Creator exhibiting problems from Terminal,
first cd to (for a default Qt installation) ~/Qt/Qt Creator.app/Contents/MacOs and then type ./Qt\ Creator to launch it.
Now there should be some diagnostic output visible that could help debugging... -
Thanks, but when I run Qt Creator from Terminal, there is by default no output, Qt Creator just starts. Is there a way to force diagnostic output? If I try ./Qt\ Creator -version I get "Qt Creator 3.0.1 based on Qt 5.2.1" followed by a long list of plugins, but nothing very useful for debugging.
I have tried removing Qt (using the Maintenance Tool.app) and reinstalling it, but the same problem persists. I have also tried removing the Qt Creator settings from the locations mentioned in the "QtCreator FAQ":http://qt-project.org/doc/qtcreator-3.0/creator-faq.html but that also didn't make a difference.
When I copy a basic QDialog-based project from the Mac with the working installation to the other Mac, it fails to compile, with the following error message:
"In file included from ../qt-test/dialog.cpp:2:
../qt-test/ui_dialog.h:13:10: fatal error: 'QtGui/QAction' file not found
#include <QtGui/QAction>"As far as I have been able to determine, QAction is supposed to be in QtWidgets, but used to be in QtGui in Qt 4, so it seems like Qt Creator is picking up some leftover Qt 4-related setting somewhere.
-
Hmm, if there's no output then Qt Creator thinks all's fine and dandy when it starts :-)
next would be to check the kits, i.e. in Qt Creator, open Preferences. select Build & Run and 2nd tab KIts. Check Auto-detected, it should say "Desktop Qt 5.2.1 clang 64bit"...