C++ (Qt)ui.preLoad->setChecked( p.preLoad );
itemMenu->addAction( &onLoad);
onLoad.setCheckable( true ); onLoad.setChecked( cfg.preferences.onLoad); connect( &onLoad, SIGNAL( triggered() ), this, SLOT( trig() ) );
ui.onLoad->setChecked( p.onLoad );
onLoad.setCheckable( true ); onLoad.setChecked( cfg.preferences.onLoad ); connect( &onLoad, SIGNAL( triggered() ), this, SLOT( trig() ) );
void MainWindow::trig(){ if ( onLoad.isChecked () ) cfg.preferences.onLoad = true; else cfg.preferences.onLoad = false;}
ui.preLoad->setChecked( p.onLoad );
C++ (Qt)connect( &onLoad, SIGNAL( triggered(bool) ), SLOT( trig(bool) ) );...void MainWindow::trig(bool isChecked){ cfg.preferences.onLoad = isChecked;}
C++ (Qt)connect( &onLoad, SIGNAL( triggered(bool) ), &cfg.preferences, SLOT( setOnLoad(bool) ) );
onLoad.setCheckable( true ); onLoad.setChecked( cfg.preferences.onLoad); connect( &pronounceOnLoadMain, SIGNAL( triggered( bool ) ), this, SLOT( trig( bool ) ) );
void trig( bool isChecked );
void MainWindow::trig( bool isChecked ){ cfg.preferences.onLoad = isChecked;}