Nothing helped to solve “Undefined reference to vtable” in Qt
问题 I can't build this with error "undefined reference to vtable for CustomUndoStack" Here's the code: class CustomUndoStack : public QObject { Q_OBJECT public: }; int main(int argc, char *argv[]) { QCoreApplication qCoreApplication(argc, argv); CustomUndoStack uStack; return qCoreApplication.exec(); } Here's .pro file: QT += widgets CONFIG += c++14 console CONFIG -= app_bundle DEFINES += QT_DEPRECATED_WARNINGS SOURCES += main.cpp I've deleted manually the build directory, I've tried "Clean All"