QToolButton that was checked with setChecked( Qt::Checked ) needs two clicks to uncheck
This post is deleted!
What version of Qt ?
On what OS ?
Can you show the code you are using ?
Sorry for the incomplete post. Qt 5.10 x64 VS2017 Win10 64
Code is pretty standard stuff.
QToolButton* button = new QToolButton;
QIcon icon = ...
button->setIcon( icon );
button->setIconSize( QSize( 24, 24 ) );
button->setText( text ) );
button->setMinimumSize( 60, 50 );
button->setMaximumSize( 60, 50 );
button->setToolButtonStyle( Qt::ToolButtonTextUnderIcon );
button->setCheckable( true );
if( check )
button->setChecked( Qt::Checked );
m_bg->addButton( button, buttonId++ );
layout->addWidget( button );
OOI does it make any difference to behaviour if you move the
setChecked()to after the button widget has been added to the layout?
No, I moved it around already, before and after the add to the layout and before and after the add to the button group. No difference.