Code: Select all
m_numLockRBTN = new QRadioButton( tr( "NumLock" ) );
m_scrollLockRBTN = new QRadioButton( tr( "ScrollLock" ) );
if ( Overlord::getInstance()->numlockIsGold() )
{
m_numLockRBTN->setChecked( true );
}
else
{
m_scrollLockRBTN->setChecked( true );
}
Moving the if statement lower in the constructor after all objects have been created, added to layouts and groups and the main dialog layout assigned allows the code to work.
CheckBox and the other widgets (at least the other ones I've used) don't have this issue.
It appears setChecked( bool) doesn't properly handle a parent of nullptr.
I built from tip of tip just a few days ago.