I've got a button, assigned to a QDialog this way:
QPushButton *button = ui->buttonBox->button(QDialogButtonBox::StandardButton::Ok);
How do I get it as a child from a QDialog?
I wanted to use:
parentWidget->findChild<QPushButton*>(QDialogButtonBox::StandardButton::Ok);
but findChild<T>
needs a QString.
Any suggestions?
Get the buttonBox by its object name first, and then you can get the button you want: