Questions tagged [qcheckbox]

A QCheckBox is a GUI class from the Qt toolkit which provides a checkbox with a text label.

A QCheckBox is an option button that can be switched on (checked) or off (unchecked). Checkboxes are typically used to represent features in an application that can be enabled or disabled without affecting others.

The official documentation for this Qt class can be found here

175 questions
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
2
votes
2 answers

Disabled checkbox for QTreeWidget

Does anyone know how to make an uneditable checkbox ina QTreeWidgetItem but keep the QTreeWidgetItem selectable?
Jay
  • 3,373
  • 6
  • 38
  • 55
2
votes
1 answer

Qcheckbox minimum one option is always checked in QT -c++

I have a QT application with qcheckboxes. I would like to achive that one checkbox is always checked and i can check as much as i want, but one is always must be checked. How can i do this?
Kaguro
  • 67
  • 9
2
votes
2 answers

Restoring QCheckBox with Qsettings

Having QCheckBox wants to save and restore checkstate after closing file. Tried following but it does not really work! The code: import sys from PyQt5 import QtCore, QtGui, QtWidgets class SecondOrder(QtWidgets.QWidget): def __init__(self,…
Pavel.D
  • 561
  • 1
  • 15
  • 41
2
votes
1 answer

Ability to disable QCheckbox if two other QCheckboxes are selected

I have 3 checkboxes that I have created in Designer using PyQt5. I am wanting to have the logic flow like this: If any of the 2 checkboxes are checked, disable the last remaining checkbox. Once a checkbox is unchecked, the disabled checkbox should…
Excalibur
  • 67
  • 7
2
votes
1 answer

Dynamically insert checkboxes into a tabWidget

I am building a small application using pyQt5. Till now I've built a UI using QtCreator, converted that to a Python file using pyuic and now on the push of a button, it should dynamically populate the tabWidget's tabs with checkboxes having labels…
Raghav Kukreti
  • 552
  • 5
  • 18
2
votes
0 answers

How to make exclusive QCheckBox

I saw many informations about QGroupBox but it was always inside different class or function. I would like to create a GroupBox directly inside my Gui window without creatin a new class or anything and I didn't find any solution. I need to keep my…
Cheen
  • 86
  • 3
  • 12
2
votes
0 answers

PyQt: Combobox not displaying

I'm trying to write a python script using PyQt. I want to grab from a sqlite db some info and then display it in checkboxes inside a scroll-area in case the list gets too big: def addCheckBox(self): cbCurrentTxt =…
dotCod
  • 21
  • 2
2
votes
3 answers

How to connect QChekBox state to QComboBox state?

I want to enable a combobox - which is disabled from the properties editor in Qt Designer - but, only if the user checks the checkbox. I wrote the following, but it is not working. It is put inside the __init__ method of my mainclass. Could you…
Eleftheria
  • 143
  • 2
  • 7
2
votes
1 answer

Get table row values based on whether QCheckbox is checked

I have an issue getting the values of a QTableWidget based on whether a QCheckBox is checked. from PyQt4 import QtGui import cx_Oracle from PyQt4.QtGui import * from PyQt4.QtCore import Qt from sympy import true class PCFFileChecker(QFrame): …
user4311023
2
votes
1 answer

Change text color of QCheckBox in pyqt

I want to change the color of the text next to a QCheckBox. I have tried these 2 questions: how to change QCheckBox text label color in Qt? Changing QCheckBox text color None of those solutions seem to be working for me. p =…
Tanay
  • 21
  • 1
  • 6
2
votes
2 answers

How to draw a Square between the text and the checkbox in QCheckBox

I need to customize the QCheckbox like this: add a square between the checkbox and the text : So to do this, I inherit QCheckBox and override paintEvent(QPaintEvent*): void customCheckBox::paintEvent(QPaintEvent*){ QPainter p(this); …
Tiana987642
  • 696
  • 2
  • 10
  • 28
2
votes
2 answers

how do I get the text from the checkbox?

I have built a group checkbox by: self.group = QtGui.QButtonGroup() How can I get the checkbox text which is/are clicked ? self.group.buttonClicked.connect(self.btnCliked)
manChan
  • 73
  • 2
  • 9
2
votes
1 answer

Making a QLabel invisible/visible after unchecking/checking QCheckBox

I will start by describing my C++ GUI app. I have a home screen (mainwindow) which has a number of labels(kpi's) that show various data. And there is a settings button in the home screen, pressing which a settings dialog (consettingsdialog) opens…
RicoRicochet
  • 2,249
  • 9
  • 28
  • 53
2
votes
1 answer

QCheckbox name access

I generate checkboxes as follows: foreach(QString filt, types){ QCheckBox *checkbox = new QCheckBox(filt, this); checkbox->setChecked(true); vbox->addWidget(checkbox); } I need to get access to these checkboxes by name but they are all…
sark9012
  • 5,485
  • 18
  • 61
  • 99
1 2
3
11 12