Caius Aérobus
19th October 2009, 16:12
I get an error at linking stage since I add a new class above my main() (undefined reference to `vtable for myHelp'). I have read that such an error may be due to the lack of a moc_ file and surprisingly Qmake does not generate a moc_ file for this file named main.cxx
Any help?
class myHelp : public QMessageBox
{
Q_OBJECT
public:
myHelp(QString text=QString());
virtual ~myHelp() {};
public slots:
int minimumWidth() const {return 800;};
QSize minimumSize() const {return QSize(800, 800);};
};
myHelp::myHelp(QString text)
: QMessageBox(QMessageBox::NoIcon, QString::fromLocal8Bit("My message"), text, QMessageBox::Ok)
{};
int main()
...
Any help?
class myHelp : public QMessageBox
{
Q_OBJECT
public:
myHelp(QString text=QString());
virtual ~myHelp() {};
public slots:
int minimumWidth() const {return 800;};
QSize minimumSize() const {return QSize(800, 800);};
};
myHelp::myHelp(QString text)
: QMessageBox(QMessageBox::NoIcon, QString::fromLocal8Bit("My message"), text, QMessageBox::Ok)
{};
int main()
...