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
4
votes
1 answer

Move icon to right side of text in a QCheckBox

I'm trying to move the icon of a QCheckBox from the left of the label to immediately on the right. I've checked these posts: PyQt4 QPushButton text and icon alignment Align icon on the right and center the text in a QPushButton But neither seem to…
Diziet Asahi
  • 38,379
  • 7
  • 60
  • 75
4
votes
1 answer

How to resize QCheckBox

The code below creates a single Dialog window with two checkboxes. Second checkbox was constrained to a 8x8px size with setMaximumSize(8, 8) function. But it appears that the smaller size of the checkbox widget was not applied to the cross icon. So…
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
4
votes
3 answers

QStyledItemDelegate: how to make checkbox button to change its state on click

I have a delegate MyDelegate which is used for QListWidget. The delegate is derived from QStyledItemDelegate. One of the goals of MyDelegate is to place a checkbox button on each row of ListWidget. It is done within the paint() event of MyDelegate:…
vicrucann
  • 1,703
  • 1
  • 24
  • 34
4
votes
2 answers

Change checkbox position for a QCheckBox

I have a QCheckbox in a grid layout defined as such: self.isSubfactorCheckbox = QtGui.QCheckBox('Is &subfactor', self) By default the checkbox is to the left of the "Is subfactor" text. I wish to move it to the right of the text. I've tried playing…
Virgiliu
  • 3,068
  • 6
  • 32
  • 55
4
votes
2 answers

How can I disable a QCheckBox WITHOUT triggering an event?

I am wondering if there is anyway to disable (setCheckState) on a check box (QCheckBox) in pyqt "WITHOUT" triggering an event? So it is simply a display change with the checkbox now unticked but not triggering the method I have it connected to.…
Nick van Diem
  • 95
  • 1
  • 7
4
votes
2 answers

QCheckBox detect click on label

Is there any way to detect if the user clicked on the label on a QCheckBox or not? If so, I want to execute something and the checkstate should not be changed .. to checked or unchecked. So far I can not find any signals / ways for that ..
Niklas
  • 23,674
  • 33
  • 131
  • 170
3
votes
3 answers

How to style the checkbox in a QListView so that the label is under the checkbox?

I have an horizontal QListView and I want to customize the checkbox and label inside with a stylesheet to put the label under the checkbox, not at the right side. How can it be done?
hokkos
  • 500
  • 6
  • 17
3
votes
1 answer

QCheckbox to check all other QCheckBoxes

My question is very similar to this post, Python PyQt - Checkbox to uncheck all other checkboxes. However, I am trying to check all other boxes when main checkbox is selected and at the same time, if any of the other boxes are selected…
pyPN
  • 105
  • 3
  • 9
3
votes
1 answer

How can i change the font size of the checkbox Name

Here is my code, i want to change font size of the checkbox name and increase the boarded size of the comboBOx, i tried like this but i am not getting the output properly.Can you please guide me how to change the size of the font import sys from…
raghava
  • 167
  • 2
  • 9
3
votes
1 answer

Checkbox to uncheck all other checkboxes

I'm trying to put in some validation such that: When either "Select A" or "Select B" is checked, "None Selected" is automatically unchecked When "None Selected" is checked, both "Select A" and "Select B" are automatically unchecked But when I run…
kraussian
  • 269
  • 1
  • 4
  • 16
3
votes
1 answer

QCheckBox state change PyQt4

I'm trying to implement a system in PyQt4 where unchecking a checkbox would call function disable_mod and checking it would call enable_mod. But even though state is changing the checkboxes call the initial function they started with. For this case…
Dipanjan Patra
  • 59
  • 1
  • 3
  • 10
3
votes
4 answers

Changing QCheckBox indicator rectangle color

I'm trying to change only the color of QCheckBox indicator rectangle. Currently I succeed to draw the right and the bottom line of the rectangle. Probably I'm doing something wrong here. Here is my…
Simon
  • 1,522
  • 2
  • 12
  • 24
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
3
votes
1 answer

pyqt4 correctly connecting QCheckbox state

I have a class QWidget class containing a QLabel. The class generates QCheckbox'es in a QVBox. I am trying to connect each checkbox to the method nameCheckBox which will update the QLabel to display the title of the last checked box. However when a…
kaligne
  • 3,098
  • 9
  • 34
  • 60
3
votes
2 answers

Qt How to check state checkbox in QtableWidget

Recently I found the way that checkbox places in the middle of QtableWidget item. However, I do not know how to check state whether or not button is clicked. Could you tell me how to check button state? here is what Ive found code: QWidget *pWidget…
Jongju Kim
  • 184
  • 2
  • 13
1
2
3
11 12