Skip to content

PythonQt.QtGui.QButtonGroup · declarations 001

Back to PythonQt.QtGui.QButtonGroup

addButton

addButton(arg__1: Any, id: int) -> None

X.addButton(arg__1, id)

Supplemental documentation: Qt 5 reference:

void QButtonGroup::addButton(QAbstractButton *button, int id \= -1)

Adds the given button to the button group. If id is -1, an id will be assigned to the button. Automatically assigned ids are guaranteed to be negative, starting with -2. If you are assigning your own ids, use positive values to avoid conflicts.

See also removeButton() and buttons().

Upstream PySide2 reference signatures (binding differences may apply):

addButton(self, arg__1: PySide2.QtWidgets.QAbstractButton, id: int=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#addButton

button

button(id: int) -> Any

X.button(id) -> PythonQt.QtGui.QAbstractButton

Supplemental documentation: Qt 5 reference:

QAbstractButton *QButtonGroup::button(int id) const

Returns the button with the specified id, or nullptr if no such button exists.

This function was introduced in Qt 4.1.

Upstream PySide2 reference signatures (binding differences may apply):

button(self, id: int) -> PySide2.QtWidgets.QAbstractButton

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#button

buttonClicked

buttonClicked(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QButtonGroup.buttonClicked; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QButtonGroup::buttonClicked(QAbstractButton *button)

This signal is emitted when the given button is clicked. A button is clicked when it is first pressed and then released, when its shortcut key is typed, or when QAbstractButton::click() or QAbstractButton::animateClick() is programmatically called.

Note: Signal buttonClicked is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:

connect(buttonGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
    [=](QAbstractButton *button){ /* ... */ });

See also checkedButton() and QAbstractButton::clicked().

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#buttonClicked

buttonPressed

buttonPressed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QButtonGroup.buttonPressed; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QButtonGroup::buttonPressed(QAbstractButton *button)

This signal is emitted when the given button is pressed down.

Note: Signal buttonPressed is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:

connect(buttonGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonPressed),
    [=](QAbstractButton *button){ /* ... */ });

This function was introduced in Qt 4.2.

See also QAbstractButton::pressed().

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#buttonPressed

buttonReleased

buttonReleased(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QButtonGroup.buttonReleased; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QButtonGroup::buttonReleased(QAbstractButton *button)

This signal is emitted when the given button is released.

Note: Signal buttonReleased is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:

connect(buttonGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonReleased),
    [=](QAbstractButton *button){ /* ... */ });

This function was introduced in Qt 4.2.

See also QAbstractButton::released().

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#buttonReleased

buttonToggled

buttonToggled(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QButtonGroup.buttonToggled; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QButtonGroup::buttonToggled(QAbstractButton *button, bool checked)

This signal is emitted when the given button is toggled. checked is true if the button is checked, or false if the button is unchecked.

Note: Signal buttonToggled is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:

connect(buttonGroup, QOverload<QAbstractButton *, bool>::of(&QButtonGroup::buttonToggled),
    [=](QAbstractButton *button, bool checked){ /* ... */ });

This function was introduced in Qt 5.2.

See also QAbstractButton::toggled().

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#buttonToggled

buttons

buttons() -> tuple

X.buttons() -> tuple

Supplemental documentation: Qt 5 reference:

QList\<QAbstractButton *> QButtonGroup::buttons() const

Returns the button group's list of buttons. This may be empty.

See also addButton() and removeButton().

Upstream PySide2 reference signatures (binding differences may apply):

buttons(self) -> typing.List[PySide2.QtWidgets.QAbstractButton]

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#buttons

checkedButton

checkedButton() -> Any

X.checkedButton() -> PythonQt.QtGui.QAbstractButton

Supplemental documentation: Qt 5 reference:

QAbstractButton *QButtonGroup::checkedButton() const

Returns the button group's checked button, or nullptr if no buttons are checked.

See also buttonClicked().

Upstream PySide2 reference signatures (binding differences may apply):

checkedButton(self) -> PySide2.QtWidgets.QAbstractButton

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#checkedButton

checkedId

checkedId() -> int

X.checkedId() -> int

Supplemental documentation: Qt 5 reference:

int QButtonGroup::checkedId() const

Returns the id of the checkedButton(), or -1 if no button is checked.

This function was introduced in Qt 4.1.

See also setId().

Upstream PySide2 reference signatures (binding differences may apply):

checkedId(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#checkedId

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QButtonGroup.destroyed; argument details are not documented.

exclusive instance-attribute

exclusive: bool

Qt 5 reference:

exclusive : bool

This property holds whether the button group is exclusive

If this property is true, then only one button in the group can be checked at any given time. The user can click on any button to check it, and that button will replace the existing one as the checked button in the group.

In an exclusive group, the user cannot uncheck the currently checked button by clicking on it; instead, another button in the group must be clicked to set the new checked button for that group.

By default, this property is true.

Access functions:

bool exclusive() const
void setExclusive(bool)

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#exclusive

id

id(button: Any) -> int

X.id(button) -> int

Supplemental documentation: Qt 5 reference:

int QButtonGroup::id(QAbstractButton *button) const

Returns the id for the specified button, or -1 if no such button exists.

This function was introduced in Qt 4.1.

See also setId().

Upstream PySide2 reference signatures (binding differences may apply):

id(self, button: PySide2.QtWidgets.QAbstractButton) -> int

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#id

idClicked

idClicked(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QButtonGroup.idClicked; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QButtonGroup::idClicked(int id)

This signal is emitted when a button with the given id is clicked.

This function was introduced in Qt 5.15.

See also checkedButton() and QAbstractButton::clicked().

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#idClicked

idPressed

idPressed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QButtonGroup.idPressed; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QButtonGroup::idPressed(int id)

This signal is emitted when a button with the given id is pressed down.

This function was introduced in Qt 5.15.

See also QAbstractButton::pressed().

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#idPressed

idReleased

idReleased(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QButtonGroup.idReleased; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QButtonGroup::idReleased(int id)

This signal is emitted when a button with the given id is released.

This function was introduced in Qt 5.15.

See also QAbstractButton::released().

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#idReleased

idToggled

idToggled(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QButtonGroup.idToggled; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QButtonGroup::idToggled(int id, bool checked)

This signal is emitted when a button with the given id is toggled. checked is true if the button is checked, or false if the button is unchecked.

This function was introduced in Qt 5.15.

See also QAbstractButton::toggled().

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#idToggled

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QButtonGroup.objectNameChanged; argument details are not documented.

removeButton

removeButton(arg__1: Any) -> None

X.removeButton(arg__1)

Supplemental documentation: Qt 5 reference:

void QButtonGroup::removeButton(QAbstractButton *button)

Removes the given button from the button group.

See also addButton() and buttons().

Upstream PySide2 reference signatures (binding differences may apply):

removeButton(self, arg__1: PySide2.QtWidgets.QAbstractButton) -> None

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#removeButton

setExclusive

setExclusive(arg__1: bool) -> None

X.setExclusive(arg__1)

Upstream PySide2 reference signatures (binding differences may apply):

setExclusive(self, arg__1: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#setExclusive

setId

setId(button: Any, id: int) -> None

X.setId(button, id)

Supplemental documentation: Qt 5 reference:

void QButtonGroup::setId(QAbstractButton *button, int id)

Sets the id for the specified button. Note that id cannot be -1.

This function was introduced in Qt 4.1.

See also id().

Upstream PySide2 reference signatures (binding differences may apply):

setId(self, button: PySide2.QtWidgets.QAbstractButton, id: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qbuttongroup.html#setId