A QButtonGroup is a class from the Qt Toolkit which provides a container to organize groups of button widgets.
Questions tagged [qbuttongroup]
23 questions
8
votes
1 answer
In qt designer QButtonGroup is not available in the Widget Box.
I use designer to build my GUI and load the saved xml in a python script. I've been using QGroupBox to contain radio buttons but would prefer to use QButtonGroup. The problem is that QButtonGroup is not available in the 'Widget Box' within the…

BlackBear
- 81
- 1
- 4
7
votes
2 answers
QDialog with ok and cancel buttons
I need Qt Dialog with ok and cancel buttons with standard functionality, placed on the right side of its layout. I need to inherit from it and add other widgets to its layout. I can implement it myself, but maybe there is something standard, in that…

Ashot
- 10,807
- 14
- 66
- 117
6
votes
1 answer
how to use QGroupBox in place of QButtonGroup
I'm trying to figure out how to use the QGroupBox widget in place of the QButtonGroup widget as the qt docs (link below) 'strongly advise against using it'.
https://doc.qt.io/archives/qt-4.7/q3buttongroup.html
The QButtonGroup had a handy method…

jonathan topf
- 7,897
- 17
- 55
- 85
4
votes
3 answers
pyqt5 show which button was clicked
I am new to PyQT5 and I want to have several buttons and have the one clicked last in a "checked" state. When another button is clicked the previous one gets "unchecked" while the clicked one gets "checked".
import sys
from PyQt5.QtWidgets import…

Johan
- 863
- 3
- 13
- 28
3
votes
1 answer
Multiple Radio button groups are linking, causing strange behavior
My program generates forms on the fly based on SQL data. I make two radio buttons and a QLineEdit entry right next to them. When the radio button on the right is checked, the QLineEdit is enabled correctly. The problem comes from the radio buttons…

Lacrosse343
- 491
- 1
- 3
- 18
3
votes
1 answer
Qt Button Group over OpenGLWidget
I am designing a user interface with Qt Creator. I have a openGLwidget which covers all the form and I want to place some buttons aligned to bottom and some kind of notification frames over the widget. Is there any default way to do that?
When I try…

meakcey
- 83
- 1
- 10
3
votes
1 answer
how do I check and uncheck all checkbox in python?
how do I select all checkboxes in
qbuttongroup
in python ?
self.group = QtGui.QButtonGroup()

manChan
- 73
- 2
- 9
2
votes
1 answer
PyQt5 QTableWidget cell select, save and copy
As extension to my previous question I add a copy_button. When user enter input to cells, and user would like select a row, and click on copy_button to copy contents and add an new row below the selected row with same content. The code below…

Pavel.D
- 561
- 1
- 15
- 41
2
votes
1 answer
Add a QGroupBox to a QButtonGroup
I have a group of 3 QRadioButtons and 2 checkable QGroupBoxes that need to all be mutually exclusive. I like the convenience of adding my radio buttons to a QButtonGroup to automatically handle this, but I can't seem to figure out how to add the…

Phlucious
- 3,704
- 28
- 61
1
vote
2 answers
How to know which button was pressed inside a QButtonGroup?
I have a function that create a frame and place a line edit and a button inside of it, then it places the button on QButtonGroup:
self.btn_group = QButtonGroup(self.ui_main.scrollArea_content)
def new(self):
# Create the frame
…

CompressedFiles
- 13
- 3
1
vote
1 answer
problem with SIGNAL SLOT new notation for QAbstractButton
I am writing a small utility composed by :
1) 4 QToolBar
2) 1 QToolBox
3) 1 QMenu
4) 1 QGraphicsView
I have some buttons on the QToolBox, each button represents a grid with different spacing.
Everytime a user clicks a button on the QToolBox the…

Emanuele
- 2,194
- 6
- 32
- 71
1
vote
1 answer
subclassing QGroupBox so that it can be member of QButtonGroup
QButtonGroups can have checkboxes. But you cannot add them to a QButtonGroup because they do not inherit QAbstractButton.
It would be really nice for some UIs to be able to have a few QGroupBoxes with exclusive checkboxes. That is, you check one and…

bfris
- 5,272
- 1
- 20
- 37
1
vote
0 answers
Press Enter emits buttonClicked on QPushButton
I'm using C++ with Qt. I have this problem. I have QLineBox (lineBox) and QButtonGroup (buttonGroup) with buttons from type QPushButton. When I press enter on lineBox, signal buttonClicked is emitted for buttonGroup.
lineBox is in QGraphicView. This…

Vladimir Yanakiev
- 1,240
- 1
- 16
- 25
1
vote
1 answer
QButtonGroup not making checkboxes exclusive
I am attempting to make a set of exclusive checkboxes, using QGroupBox (which, as I understand it, is exclusive by default), but when I run my program, the checkboxes are not exclusive and behave as they normally would.
skillP =…

Aiveebetter
- 40
- 5
1
vote
2 answers
pyqt QbuttonGroup: Passing user data on buttonClicked
I have defined my own class that inherits QbuttonGroup
class TupleButtonGroup(QtGui.QButtonGroup):
def __init__(self,parent, tuple_pair):
super(TupleButtonGroup, self).__init__(parent)
self.tuple_pair = tuple_pair
And on…

mushahid alam
- 15
- 7