QToolButton that was checked with setChecked( Qt::Checked ) needs two clicks to uncheck
Unsolved
General and Desktop
-
Hi,
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 );