I think this is a summary of what should happen.
1. start with an empty project.
2. use QT designer to create a mainwindow.ui file.
3. qt creator is supposed to create for you a header file ui_mainwindow.h containing the necessary definitions for your user interface plus a member function setupUi(). QT creator generates this ui_mainwindow.h file by calling uic(user interface compiler).
4.Now that you have this file, add this code to your project and i think it will display your Qt GUI properly
you are free to edit your GUI in Qt designer and recompile to show updated changes(i think) :)
#include "ui_mainwindow.h"
#include <QMainWindow.h>
#include <QApplication.h>
int main(int argumentCount, char * argumentValues[])
{
QApplication app(argumentCount, argumentValues);
Ui::MainWindow ui;
QMainWindow * myMainWindow= new QMainWindow();
ui.setupUi(myMainWindow);
myMainWindow->show();
return app.exec();
}
ps:
The class Ui::MainWindow contains a member function setupUi() that setsup for you the GUI.
Make sure that you have the exact class name because c++ is case sensitive.
Good luck.