Problem with signals and slots

Posted by Jen on Stack Overflow See other posts from Stack Overflow or by Jen
Published on 2010-06-10T01:25:20Z Indexed on 2010/06/10 1:32 UTC
Read the original article Hit count: 360

Filed under:
|
|
|
|

I am creating a class with custom slots in Qt:


class CustomEdit : public QTextEdit
{
    Q_OBJECT

public:
    CustomEdit(QWidget* parent);

public slots:
    void onTextChanged ();
};

However, I'm getting thise linker error:

undefined reference to 'vtable for CustomEdit'

The documentation says:

if you get compiler errors along the lines of "undefined reference to vtable for LcdNumber", you have probably forgotten to run the moc or to include the moc output in the link command.

... but it is not obvious what that means.

Is there something I need to add to my class, or to the .pro file?

© Stack Overflow or respective owner

Related posts about qt

Related posts about signals