You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Tuesday, July 1st 2014, 2:58pm

QT program start without proper main window

I'm porting one example in Mark Summerfield's book: Advanced Qt Programming to QT5. I'm using QT 5.3.1&vs2013. I made some change in .pro and the source code so that the project can be build.

but when the exe runs, it shows another window(textitem dialog of the project), not the main window(an graphical editor) of the program.

the main.cpp is as following:

int main(int argc, char *argv[])
QApplication app(argc, argv);
MainWindow window;;

app.setApplicationName(app.translate("main", "Page Designer"));
app.setOrganizationName("Qtrac Ltd.");
#ifdef Q_WS_MAC


return app.exec();

due the upload limit, I can't attach the source(The source should be build with QT greater than 5.0). but I can send it by mail .

I think this problem doesn't belong to QT5 only.

does anyone knows why? thank you in andvance.
xwing has attached the following files:



  • "pele1410" is male

Posts: 127

Location: Lafayette, LA

  • Send private message


Thursday, July 10th 2014, 12:41pm

Can we see your MainWindow code?
"Without imperfection, you or I would not exist." ~Stephen Hawking

Similar threads

Used tags

GUI, main window