View Single Post
Posts: 434 | Thanked: 325 times | Joined on Sep 2009
#57
One more thing I noticed (for simpletons like me ). If you try to create a new project with Qt Creator and then compile it with MADDE, it won't work. You first need to create it with MADDE using the:

mad pscreate -t qt_simple <project name>

And then you can open that project with Qt Creator. By right clicking the project, choose Add New. I then choose Qt Designer Form Class . In the next page I've tried Main Window and Widget. They both seem to work fine. I don't know which is the better one or if it matters at all.

In the next page I found it better to append to the path \src as this is where MADDE creates the qtmain.cpp. After these files have been added, I edit qtmain.cpp so that it looks something like this (if using Widget):

Code:
#include <QtGui/QApplication>
#include "form.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    Form f;
    f.show();
    return a.exec();
}
This, at least, works for me.
 

The Following 4 Users Say Thank You to Sasler For This Useful Post: