Connect the signal to the slot in your code using QObject::connect(). For example:
In the header file:
class MyClass
: public QWidget,
private Ui
::MyWidget { Q_OBJECT
public:
public slots:
void mySlot();
}
class MyClass : public QWidget, private Ui::MyWidget {
Q_OBJECT
public:
MyClass(QWidget *parent = 0);
public slots:
void mySlot();
}
To copy to clipboard, switch view to plain text mode
In the source file:
{
setupUi(this);
connect(m_button, SIGNAL(clicked()),
this, SLOT(mySlot()));
}
MyClass::MyClass(QWidget *parent)
: QWidget(parent)
{
setupUi(this);
connect(m_button, SIGNAL(clicked()),
this, SLOT(mySlot()));
}
To copy to clipboard, switch view to plain text mode
Bookmarks