Hi there,
as a complete newbie to both qt and C++ i am trying to reproduce the examples textfinder and addressbook.
All goes well until i come to the slots part where i declare:
private slots:
void on_findButton_clicked();
private slots:
void on_findButton_clicked();
To copy to clipboard, switch view to plain text mode
The complete code in textfinder.h is below
The debug error i get is:
debug/moc_textfinder.o:C:\qtbron\textfinder/debug/moc_textfinder.cpp:72:
undefined reference to `textfinder:n_findButton_clicked()'
I guess it is enviremental but have no clue.
Thanks in advance.
#ifndef TEXTFINDER_H
#define TEXTFINDER_H
#include <QWidget>
#include <QObject>
namespace Ui {
class textfinder;
}
class textfinder
: public QWidget { Q_OBJECT
public:
~textfinder();
protected:
private:
Ui::textfinder *ui;
void loadTextFile();
private slots:
void on_findButton_clicked();
};
#endif // TEXTFINDER_H
#ifndef TEXTFINDER_H
#define TEXTFINDER_H
#include <QWidget>
#include <QObject>
namespace Ui {
class textfinder;
}
class textfinder : public QWidget {
Q_OBJECT
public:
textfinder(QWidget *parent = 0);
~textfinder();
protected:
void changeEvent(QEvent *e);
private:
Ui::textfinder *ui;
void loadTextFile();
private slots:
void on_findButton_clicked();
};
#endif // TEXTFINDER_H
To copy to clipboard, switch view to plain text mode
Bookmarks