The cleanest way is to forward the signal in myCentralWidget so that the myCentralWidget class has a signal you can connect to in MainWindow.
So you declare a signal in myCentralWidget
class myCentralWidget
: public QWidget{
Q_OBjECT
public:
// ...
signals:
void someButtonClicked(); // or use a name that indicates that the user wants to do
};
class myCentralWidget : public QWidget
{
Q_OBjECT
public:
// ...
signals:
void someButtonClicked(); // or use a name that indicates that the user wants to do
};
To copy to clipboard, switch view to plain text mode
and forward the button's signal, e.g. in the constructor
connect( ui->someButton, SIGNAL(clicked()), this, SIGNAL(someButtonClicked()) );
connect( ui->someButton, SIGNAL(clicked()), this, SIGNAL(someButtonClicked()) );
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks