If click on buddy label of check or radio, then toggle
This commit is contained in:
committed by
craig.p.drummond
parent
dc6084c2b1
commit
3bb4d3bd5e
@@ -48,6 +48,7 @@
|
||||
characters in artist names with the relevant URL encoding.
|
||||
6. Use CMake to locate X11 libraries and headers.
|
||||
7. Set minimum size for initial settings wizard.
|
||||
8. If buddy of a checkbox or radio is clicked, then toggle check or radio.
|
||||
|
||||
1.3.1
|
||||
-----
|
||||
|
||||
@@ -70,16 +70,16 @@ void BuddyLabel::mouseReleaseEvent(QMouseEvent *)
|
||||
|
||||
buddy()->setFocus();
|
||||
|
||||
// QCheckBox *cb=qobject_cast<QCheckBox*>(buddy());
|
||||
// if (cb) {
|
||||
// cb->setChecked(!cb->isChecked());
|
||||
// return;
|
||||
// }
|
||||
// QRadioButton *rb=qobject_cast<QRadioButton*>(buddy());
|
||||
// if (rb) {
|
||||
// rb->setChecked(!rb->isChecked());
|
||||
// return;
|
||||
// }
|
||||
QCheckBox *cb=qobject_cast<QCheckBox*>(buddy());
|
||||
if (cb) {
|
||||
cb->setChecked(!cb->isChecked());
|
||||
return;
|
||||
}
|
||||
QRadioButton *rb=qobject_cast<QRadioButton*>(buddy());
|
||||
if (rb) {
|
||||
rb->setChecked(!rb->isChecked());
|
||||
return;
|
||||
}
|
||||
QComboBox *combo=qobject_cast<QComboBox*>(buddy());
|
||||
if (combo) {
|
||||
combo->showPopup();
|
||||
|
||||
Reference in New Issue
Block a user