Questions tagged [qgroupbox]

A QGroupBox is a class from the Qt Toolkit which provides a group box frame with a title.

Documentation can be found here (Qt4) and here (Qt5).

82 questions
12
votes
2 answers

Removing the title from a QGroupBox

Is it possible to completely remove the title from a QGroupBox? If you just give it an empty title, the label where the title would be still takes up space. It looks like this: But I want it to look like this instead: I tried the following things…
Stefan Pfeifer
  • 593
  • 6
  • 16
9
votes
1 answer

Adjust title position in a QGroupBox (using style sheets)

I am trying to style a QGroupBox to match certain design requirements: Note - the group title on top should be on the left but past the box curvature. With the following style sheet, I get the images below (second image if I remove the word…
Thalia
  • 13,637
  • 22
  • 96
  • 190
6
votes
1 answer

Adding a widget into QGroupBox

I am trying to add a QPushButton widget into a QGroupBox such as: self.btn = QtGui.QPushButton('Push Button') self.grp_box = QtGui.QGroupBox('Button Section') self.grp_box.addWidget(self.btn) When trying to run the code, I got this error :…
dissidia
  • 1,531
  • 3
  • 23
  • 53
6
votes
2 answers

Looping over widgets inside widgets inside layouts

Similar question to what we have here Loop over widgets in PyQt Layout but a bit more complex... I have QVGridLayout QGroupBox QGridLayout QLineEdit I'd like to access QLineEdit but so far I dont know how to access children of…
Dariusz
  • 960
  • 13
  • 36
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
5
votes
2 answers

set focus on button in app with group boxes

Let's say I have an application with a number of QGroupBoxes like so: import sys from PyQt4 import QtGui, QtCore class Main(QtGui.QWidget): # pylint: disable=too-many-statements def __init__(self, main): super(Main,…
Bob Sacamano
  • 699
  • 15
  • 39
5
votes
2 answers

QGroupBox find selected Radio Button

I have created a simple UI consisting of a QGroupBox with a bunch of QRadioButtons (32 to be exact) and I want to be able to find the selected one. I've looked at forums and things, but the answers I've found don't work, and one referenced…
Oliver
  • 1,576
  • 1
  • 17
  • 31
3
votes
1 answer

QGridlayout and QGroupbox alignment

I've created a widget with contents of 3 QGroupbox, I am trying to place and align them respectively with QGridLayout. Strange behaviour of QGroupboxsmakes this question. What looks like currently. As shown above figure when Qwidget screen…
Pavel.D
  • 561
  • 1
  • 15
  • 41
3
votes
0 answers

QGroupBox: label cut and positioning inside QGridLayout

To be more clear explaining my problem, I've done a screenshot with some notes on it, hope it helps: QGroupBox Layout format problem As you can see from it, I have one big QVBoxLayout for the main layout of the app, inside it I've put a Qwidget,…
3
votes
1 answer

PyQt5 QScrollArea widget with dynamically created GroupBoxes

I'm trying to make a toolbox widget that will do various different things. But I'm having trouble with the layout management regarding the QScrollArea. Following the stripped version of the code I have: from PyQt5 import QtWidgets import sys class…
Ned U
  • 401
  • 2
  • 7
  • 15
3
votes
1 answer

How to control QGroupBox resizing

The code below creates a single dialog with GroupBox() resizing in sync with the dialog. This is default resizing policy for GroupBox. How to change this policy so GroupBox occupies as little space (area) as possible and never expands vertically.…
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
3
votes
1 answer

Why won't QGroupBox widgets dynamically resize with rest of window?

I have a QMainWindow with the widgets laid out in a grid. They all resize proportionally when the window resizes as expected, except for the widgets placed inside a QGroupBox. The QGroupBox itself resizes, but the widgets inside just stay on the…
R01k
  • 735
  • 3
  • 12
  • 26
3
votes
1 answer

QGroupBox title vertical alignment

I have QGroupBox in my UI. The basic style is 2px width border, border radius and the title being vertically centered. I used the following style to my stylesheet (which is in a .qrc, applied in the main using app->setStylesheet): QGroupBox { …
Krapow
  • 611
  • 6
  • 26
3
votes
1 answer

Override checkable QGroupBox toggle behaviour

I've subclassed the QGroupBox class, with the checkable property enabled. I'm trying to override the behaviour of the toggle/checked events. Here's the code: class SideWidgetGroupBox: public QGroupBox { Q_OBJECT public: …
Istvan Szasz
  • 1,307
  • 17
  • 31
2
votes
2 answers

Using the GroupBoxes in Qt

I'm a student programmer and I am using Qt to build a GUI application. I'm trying to ensure that some check boxes are checked in order to proceed. These check boxes enable or disable the group box itself and are part of the QGroupBox class. Accepted…
Wylie Coyote SG.
  • 1,009
  • 6
  • 22
  • 37
1
2 3 4 5 6