Hi,
I am trying to run a function when a Qt Push button is pressed. Here are my code snippets:
Interface header file
button
->setObjectName
(QString::fromUtf8("action_button"));
button
->setGeometry
(QRect(20,
30,
210,
131));
QPushButton *button;
button = new QPushButton(tab);
button->setObjectName(QString::fromUtf8("action_button"));
button->setGeometry(QRect(20, 30, 210, 131));
To copy to clipboard, switch view to plain text mode
Class Constructor
connect(ui.action_button, SIGNAL(activated()), this, SLOT(function()));
connect(ui.action_button, SIGNAL(activated()), this, SLOT(function()));
To copy to clipboard, switch view to plain text mode
Some help would be great!
Bookmarks