QtDesigner and C++ Help

Hi,
I am fairly new to Qt. I am having an issue producing the relevant C++ code for a GUI created using QtDesigner.

The reason I must use QtDesigner and not QtCreator is that I need to use the QTango widgets for Tango control system and I believe they only come with QtDesigner.

I produced the ui_mydialog.h file by calling uic on the .ui file but not much more. I have tried to create the main.cpp but I am receiving errors such as undefined reference to QApplication...etc even though I have put the path to QApplication in the include path. I am not sure how to create the makefile for this project.

Has anyone had similar issues or have experience with this? Any help is greatly appreciated. Thanks

Qt Creator and Qt Designer use the same designer plugin. This means that Qt Creator doesn't have its own designer module for Qt Widgets, Qt Creator and Qt Designer just use a library, the same library. So you don't need to avoid Qt Creator. There is a catch though: If these QTango widgets provide a Qt Designer plugin so that you they are visible in Qt Designer's widget list, than it is important that the Qt Designer itself and QTango's designer plugin are compiled with the same toolchain and Qt version etc. If QTango is compiled with, say, Qt 4.8 than you need a Qt Creator compiled with Qt 4.8. The latest versions available from qt-project.org (and now from qt.io) are compiled with Qt5.

If you use Qt Creator, it is easy to use qmake in the IDE to build your projects. You can still use Qt Creator for your project even though you use Qt Designer fır UI design. Qt Creator makes it really easy to use Qt. qmake creates a native make/nmake/XCode/MSVC project file to compile project depending on the platform (it is called mkspec in qmake's parlance).

Even if you don't use Qt Creator, you can write a pro file for your project and use qmake. qmake is not part of Qt Creator but Qt itself.

Undefined reference errors are related to linked libraries. You need to link against at least QtCore and QtGui if your using Qt4. You should have QT += core gui in your pro file.