#include <QtCore/QCoreApplication>
#include <QObject>
#include <QDebug>
#include <QApplication>
class one:public QObject
{
Q_OBJECT
public:
one();
};
one::one()
{
qDebug()<<"one";
}
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
one* q=new one();
return a.exec();
}
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
QT +=gui
# Input
SOURCES += test.cpp
错误
undefined reference to 'vtable for one'
error: collect2: ld returned 1 exit status