When using qtcreator, inherit a QWidget class
class xxx:public QWidget
{
Q_ OBJECT
explicit xxx(QWidget* parent=0);
};
Then, undefined reference to ` VTable for XXX:: XXX appears in build
Solution: turn off the qtreactor in order not to destroy some structures
Then enter the directory where the program is stored to execute
qmake xxx.pro
Then open qtreactor to build, and the error disappears
Similar Posts:
- [Solved] QT Error: error: undefined reference to ‘vtable for XXX’
- Python Typeerror: super() takes at least 1 argument (0 given) error in Python
- Problems encountered in integrating.so with Android Studio: about java.lang.unsatisfiedlinkerror: native method not found
- Pycharm cannot import the third-party library no module named urllib3
- [Solved] QT operate error: exited with code – 1073741515
- Solve the problem of destroying windows caused by multiple attchs of control classes in MFC. CWnd * pWnd = CWnd:: fromhandlepermanent (hWnd); ASSERT(pWnd != NULL); Assertion failure problem
- MAC Wireshark Permission issues (you don’t have permission to capture on that device Mac)
- QApplication:No such file or directory [How to Solve]
- Warning: will be initialized after [- writer]
- How to Solve setSupportActionBar() Method Error