A custom class inheriting from QObject who have display_error() function as SLOT would work? like this example:
#include <QObject>
{
Q_OBJECT
public:
Counter() { m_value = 0; }
int value() const { return m_value; }
public slots:
void setValue(int value);
void display_error();
signals:
void valueChanged(int newValue);
private:
int m_value;
};
#include <QObject>
class Counter : public QObject
{
Q_OBJECT
public:
Counter() { m_value = 0; }
int value() const { return m_value; }
public slots:
void setValue(int value);
void display_error();
signals:
void valueChanged(int newValue);
private:
int m_value;
};
To copy to clipboard, switch view to plain text mode
Bookmarks