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
0
votes
2 answers

Adjust QCheckbox into QTableWidget : Qt

I am facing issues when I adjust QCheckbox into QTableWidget. It is working as expected in Mac and Linux but creating problem in Windows. I have googled it and tried out different solutions, but it did not solve my problem. Code: QWidget* cellWidget…
AB Bolim
  • 1,997
  • 2
  • 23
  • 47
0
votes
1 answer

Call objects from a list which reproduces object names

I'm creating an application which has many checkBoxes. Every 4 checkBoxes are inside of a groupBox_n (n=36) and these groupBoxes are then inside of another groupBox. Each checkBox is named following a certain rule which is very convenient for me. I…
Jonas Kublitski
  • 119
  • 1
  • 11
0
votes
1 answer

Check all QCheckBox in a QtGui.QGridLayout

I made a GUI in Qt Designer and I have 144 check boxes. I want to connect all of them with a QPushButton to check and uncheck all of them. How can I do that? They are all inside of a QGridLayout. They are named following a "trend", so I tried to…
Jonas Kublitski
  • 119
  • 1
  • 11
0
votes
0 answers

QCheckbox signal emits for all chechboxes even if only one is toggled in pyQT?

def updateDataDictionary(self, opt, idx, param, check): """Populates the ScrollArea for Storage Enabling on Hub basis :param opt: Option tells what to modify: technology(0) or storage(1) :type opt: Integer :param idx: The id for the…
0
votes
1 answer

PySide / PyQt: How to create custom classes?

I'm trying to create checkbox, frame, and grid layout objects and store them in their own list. The output from Qt Designer looks like: Essentially, I want to create Checkbox1, then create a frame and grid layout to store Checkbox2 and Checkbox3.…
Arda Arslan
  • 1,331
  • 13
  • 24
0
votes
1 answer

mousePressEvent() not called on a disabled QCheckBox

I'm trying to subclass QCheckBox to make it pass mouse clicks through if disabled. When my checkbox is not disabled (isEnabled() is true), Qt calls its mousePressEvent() as expected. When it is disabled, calls do not happen. Any ideas how to…
sigil
  • 815
  • 8
  • 16
0
votes
1 answer

QCheckbox: more states than checked and unchecked

Is it possible to have more states for QCheckbox than Qt::Checked and Qt::Unchecked? I have a QTreeWidget and if an Item is checked I want the parent to show a filled checkbox (some state like "Child checked") and the children should then have a…
honiahaka10
  • 772
  • 4
  • 9
  • 29
0
votes
0 answers

How can I change color of checkBox in qt with using python?

I tried snipped code but somehow it didnt work for me. Any suggestions? checkBox.setPalette(QtGui.QPalette(QtGui.QColor(255,0,0)))
Umur Gurelli
  • 83
  • 2
  • 9
0
votes
1 answer

Getting QTableWidgetItem out of cellWidget()'s QCheckBox

I'm storing QCheckBox in QTableWidget, in following way: QCheckBox *checkBox = new QCheckBox(); QWidget *widget = new QWidget(); QHBoxLayout *layout = new…
Rob Luca
  • 153
  • 10
0
votes
0 answers

Highlight / Focus Color QCheckbox, QRadiobutton, QPushbutton

at the moment I am "playing" with C++ QT and Stylesheets. Normally I found everything in the documenttion, but unfortunatly the following problem not: ExamplePic In the example Picture you'll see my edited QPushButtons, QChecksBoxes and…
ThW
  • 11
  • 1
0
votes
1 answer

Qt QSignalMapper is emitting a signal for every item in the map

I have a function that receives a QList of a class I created. Let's call this hypothetical class "Stuff". So, this function receives a QList of Stuff I iterate through the QList, and depending on the properties of the "Stuff" object, I will…
user751612
  • 163
  • 3
  • 8
0
votes
1 answer

Is there any way to add Chekboxes dynamically that I can access them and their checkstate out of their definition scope?

I want to add checkboxes dynamically. I found some links helpfull ,but each of them has a problem that I can't solve. for example in this link we can create & add QCheckBoxes dynamically, but I can't access them out of their definition scope…
s.m
  • 209
  • 2
  • 7
  • 17
0
votes
1 answer

QCheckBox text padding

Is it possible to specify some style sheet properties for text of QCheckBox? I'm interested in padding first of all... I see that we can customize ::indicator of check box but I couldn't find any information about text.
0
votes
1 answer

How to get the status of hardcoded QCheckBoxes in QSqlQueryModel?

I have a QTableView that shows QSqlQueryModel. The model contains checkboxes that are created in each row in the first column (which contain the ref_no; the primary-key in my db) as follow: void MainWindow::showM(model){ …
McLan
  • 2,552
  • 9
  • 51
  • 85
0
votes
0 answers

QTCreator Giving ListWidgetItems Multiple Attributes

So I'm using QTCreator to create a GUI for a project. I'm reading items from a file, and then those items are imported into a ListWidget with checkboxes next to each item. I was wondering if it's possible to have the checkbox along with a spin box…
Bob343
  • 1
  • 2