diff options
Diffstat (limited to 'src/widgets/widgets/qbuttongroup.cpp')
-rw-r--r-- | src/widgets/widgets/qbuttongroup.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/widgets/qbuttongroup.cpp b/src/widgets/widgets/qbuttongroup.cpp index bd0c959396..079ef45e90 100644 --- a/src/widgets/widgets/qbuttongroup.cpp +++ b/src/widgets/widgets/qbuttongroup.cpp @@ -14,7 +14,7 @@ void QButtonGroupPrivate::detectCheckedButton() checkedButton = nullptr; if (exclusive) return; - for (int i = 0; i < buttonList.count(); i++) { + for (int i = 0; i < buttonList.size(); i++) { if (buttonList.at(i) != previous && buttonList.at(i)->isChecked()) { checkedButton = buttonList.at(i); return; @@ -57,8 +57,8 @@ void QButtonGroupPrivate::detectCheckedButton() In addition, QButtonGroup can map between integers and buttons. You can assign an integer id to a button with setId(), and retrieve it with id(). The id of the currently checked button is - available with checkedId(), and there is an overloaded signal - buttonClicked() which emits the id of the button. The id \c {-1} + available with checkedId(), and there is a signal + idClicked() that emits the id of the button. The id \c {-1} is reserved by QButtonGroup to mean "no such button". The purpose of the mapping mechanism is to simplify the representation of enum values in a user interface. @@ -82,7 +82,7 @@ QButtonGroup::QButtonGroup(QObject *parent) QButtonGroup::~QButtonGroup() { Q_D(QButtonGroup); - for (int i = 0; i < d->buttonList.count(); ++i) + for (int i = 0; i < d->buttonList.size(); ++i) d->buttonList.at(i)->d_func()->group = nullptr; } |