qt5 - Signal/Slots with VIsual studio and Qt plugin -
i have issue slots , signals in visual studio 2012 qt plugin. when compile qt project, shows error:
moc_mainwindow.obj : error lnk2019: unresolved external symbol "public: void __thiscall mainwindow::onupdate(class qstring)" (?onupdate@mainwindow@@qaexvqstring@@@z) referenced in function "private: static void __cdecl mainwindow::qt_static_metacall(class qobject *,enum qmetaobject::call,int,void * *)" (?qt_static_metacall@mainwindow@@caxpavqobject@@w4call@qmetaobject@@hpapax@z)
these classes:
mainwindow.h
#ifndef mainwindow_h #define mainwindow_h #include <qmainwindow> #include <qtextedit> #include <qstring> namespace ui { class mainwindow; } class mainwindow : public qmainwindow { q_object public: explicit mainwindow(qwidget *parent = 0); ~mainwindow(); public slots: void onupdate(qstring info); private: ui::mainwindow *ui; qtextedit *textedit; }; #endif // mainwindow_h
mainwindow.cpp
#include "mainwindow.h" #include "ui_mainwindow.h" #include <qstring> mainwindow::mainwindow(qwidget *parent) : qmainwindow(parent), ui(new ui::mainwindow) { ui->setupui(this); } mainwindow::~mainwindow() { delete ui; } mainwindow::onupdate(qstring info) { //ui->textedit->append(info); }
some help? in advance!
solved!
i've included generated files folder in project solution. anyway!
Comments
Post a Comment