So I have a bunch of QPushButtons in QGridLayout and they all have autoExclusive = true. These buttons are loaded from a .ui file.
I added two new QPushButtons to the layout programmatically, and set the same property autoExclusive to true for them.
In my code when each button is clicked I have the following
Now when I click on either of these two new QPushButtons, they don't get unchecked when I click any other button, but the rest of them do, so I'm not sure why the autoexclusive property doesn't work for these buttons that were added programmatically.Qt Code:
if (!button->isChecked()) { button->setChecked(true); }To copy to clipboard, switch view to plain text mode
Bookmarks