I find questions related to the verification / removal of QRadioButton. Images that I used to check (white dot) and uncheck (no white dot) are not updated. My problem is this: I implemented several QRadioButton (s). For the first time, all QRadioButtons check false. Thus, the images for this case do not have a white dot. When the user selects any QRadioButton, then the image is converted to another image with a white dot. When I click the button, I will clear the state of the switches from the selected one to clear the check box. However, the state of the image does not change. They remain in a controlled state. The code snippet is as follows:
the code:
if(ui->radioButtonReadOnlineData->isChecked()) ui->radioButtonReadOnlineData->setChecked(false); if(ui->radioButtonSavetoDBReadOfflineData->isChecked()) ui->radioButtonSavetoDBReadOfflineData->setChecked(false); if(ui->radioButtonViewLocalData->isChecked()) ui->radioButtonViewLocalData->setChecked(false); if(ui->radioButtonDateRange->isChecked()) ui->radioButtonDateRange->setChecked(false); if(ui->radioButtonAll->isChecked()) ui->radioButtonAll->setChecked(false);
Images for each of the QRadioButtons are set as follows:
the code:
ui->radioButtonAll->setStyleSheet( "QRadioButton::indicator::checked { image: url(:/Resources/radio-btn-selected.png);}" "QRadioButton::indicator::unchecked {image: url(:/Resources/radio-btn-unselected.png);}" );
Any tips on why QRradioButton images are not being updated. Thank you
source share