Need some clarification regarding this Qt tutorial, can someone help me out? -
i'm guessing answers these questions simple familiar qt. i'm trying follow intro tutorial qt: http://doc.qt.nokia.com/4.7-snapshot/gettingstartedqt.html. until part i've taken screenshot for:
http://i160.photobucket.com/albums/t182/thinkpad20/qtintro.jpg
i understand these 2 code blocks enough, if implement widget class show here, should putting in main function of code? doesn't anywhere. also, when try compile code, "undefined reference 'vtable notepad'" error. can me out?
undefined reference 'vtable notepad'
means you're not linking in moc-generated files. qt docs mention common mistake.
as include in main
, involves creation of application , gui element, calling exec on application. @ basic, might this:
#include <qapplication> #include "notepad.h" int main(int argc, char *argv[]) { qapplication app(argc, argv); notepad mainwindow; mainwindow.show(); return app.exec(); }
Comments
Post a Comment