Dear Friends...
I am getting an error as
MainWindow::MainWindow(QMainWindow *):
:Undefined reference to vtable for MainWindow
Could anyone please tell me what is the reason of this error..???
Dear Friends...
I am getting an error as
MainWindow::MainWindow(QMainWindow *):
:Undefined reference to vtable for MainWindow
Could anyone please tell me what is the reason of this error..???
- Make sure the Q_OBJECT macro is present in the definition of all QObject-derived classes.
- Make sure you define your QObject-derived classes in your header files ONLY.
- Make sure all of your header files are listed in your .pro file in the HEADERS= list.
- Run qmake every time you add Q_OBJECT to one of your classes or modify your .pro file.
J-P Nurmi
I will also add:
5. Make sure you implemented the constructor you had declared in the class header.
By the way, having a main window constructor that takes a QMainWindow as its parent is probably an error in design.
Bookmarks