I haven't been able to find a cleaner solution with respect to the auto exclusive property, but the following works for me in the meantime:
for(int i = 0; i < gL->count(); ++i)
{
if(btn = dynamic_cast<QPushButton*>(gL->itemAt(i)->widget()))
{
if(btn != button) // where button is the button that was just recently clicked.
{
btn->setChecked(false);
}
}
}
QGridLayout* gL = QWidget::findChild<QGridLayout *>("buttonsLayout");
QPushButton* btn = 0;
for(int i = 0; i < gL->count(); ++i)
{
if(btn = dynamic_cast<QPushButton*>(gL->itemAt(i)->widget()))
{
if(btn != button) // where button is the button that was just recently clicked.
{
btn->setChecked(false);
}
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks