0

I have probably seen all the topics discussing this issue but I still can't fix it

#pragma once

#include <QObject>
#include <QApplication>
#include <QObject>
#include <QWidget>
#include <QPushButton>
#include <QLineEdit>
#include <QHBoxLayout>

class input : public QObject {

    Q_OBJECT

public:
    input();

public slots:
  void text();


signals:
    void buttonclicked();


private:
    QWidget * w = new QWidget;
    QPushButton * ok = new QPushButton;
    QLineEdit * line = new QLineEdit;
    QHBoxLayout * layout = new QHBoxLayout;
};

this is a really simple header without implementation yet but when I build it to check the code it gives me this error and I can't really solve it

moc_clss.obj:-1: error: LNK2019: unresolved external symbol "public: void __cdecl input::text(void)" (?text@input@@QEAAXXZ) referenced in function "private: static void __cdecl input::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@input@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z)

so help please if you can .

0 Answers0