The following code is not working when the checkbox is checked. Whether the checkbox is checked or not, it jumps to the "else" statement.
void MainWindow::runButtonClicked()
{
if (MainWindow::betAllRed->isChecked()==true){
red.didBet=true;
qDebug()<<"bet Red true";
} else{
qDebug()<<"red not checked";
}
}
is there anything noticeably wrong here or is the issue elsewhere? Do I need to connect a slot to get the check state?