I have QPushButton object and a QLabel object laid out in a QGridLayout layout. This QGridLayout is set to a QGroupBox object. How do I now retrieve the QPushButton that is effectively present in this group box? I have tried the following code but it does not return a valid QPushButton object.
QGroupBox *grpBox = 0;
grpBox = (QGroupBox *)ui.tableWidget->cellWidget(fromRow, 0);
QGridLayout * gridLayout = (QGridLayout *)grpBox->layout();
QPushButton *btn = gridLayout->findChild<QPushButton *>("+");
Thanks, Rakesh.