I have a simple c++ qt program. I get error when I use private slot. Can anyone tell me how to solve this?
I am using Qt5.6, cmake on windows with mingw compiler.
This is the following error:
myClass_automoc.cpp:-1: error: undefined reference to `mywidgets::enableFindButton(QString const&)'
This is the header file.
#ifndef MYWIDGETS_H
#define MYWIDGETS_H
#include <QDialog>
class mywidgets : public QDialog
{
Q_OBJECT
public:
mywidgets();
void myDemoWidgets();
void mySecondDemoWidgets();
private:
void findLayout();
private slots:
//void findClicked();
void enableFindButton(const QString &text);
signals:
void findNext(const QString &str, Qt::CaseSensitivity cs);
void findPrevious(const QString &str, Qt::CaseSensitivity cs);
};
#endif // MYWIDGETS_H
Last edited on
That is the header. Where is the implementation?