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
1
vote
1 answer

qcheckbox not changing checked state when clicked on

I have been developing a GUI, and have run into an issue (or possible bug) with a QCheckBox. Adding a QCheckBox component to my form, compiling and running it has no issues. However, when clicking on the checkbox, no visible feedback is displayed. I…
CybeX
  • 2,060
  • 3
  • 48
  • 115
1
vote
2 answers

Python - Add checkbox to every row in QTableWidget

I am trying to add a checkbow to every row in a QTableWidget, unfortunately it only seems to appear in the first row. Here is my code: data = ['first_row', 'second_row', 'third_row'] nb_row = len(data) nb_col = 2 qTable =…
Joseph
  • 586
  • 1
  • 13
  • 32
1
vote
1 answer

QCheckBox only executes when checked twice

I have a QCheckBox (deselect_checkbox) which, when checked, sets another QCheckBox (first_checkbox) and itself to False. However, it only works every other time and I'm not sure why. Here is the code: def deselect_func(): if…
Joseph
  • 586
  • 1
  • 13
  • 32
1
vote
0 answers

Check QCheckbox with enter/return

I have a QCheckbox and which I'm trying to change the state using a keyboard press of return/enter, rather than space. For other things such as QPushbuttons/QLineEdit, I've used returnPressed() in the signal, however this doesnt work for QCheckbox…
easty
  • 35
  • 6
1
vote
2 answers

How to customize QTableWidget's checkbox?

I've tried to set some style for check box in Qt. I know that QTableWidget has QCheckbox, but the problem is that I have no idea how to set style for it. QTableWidgetItem *checkBoxItem = new…
Farzan Najipour
  • 2,442
  • 7
  • 42
  • 81
1
vote
1 answer

Save the state of QCheckBox in file, and load the state when program restarts

In my GUI application, I have some labels in my mainwindow the visibility of the labels are controlled from checkboxes in a dialog which opens when a button (setting) is pressed. Now, it all works fine, i.e. if I open the settings dialog I can check…
RicoRicochet
  • 2,249
  • 9
  • 28
  • 53
1
vote
1 answer

check state checkBox in table (pySide)

Have table 10 row , 2 column, in first colum contain check box in second just temp text. I need check state all checkBox in cloumn 1 after press button named Copy ( just print…
Ash
  • 35
  • 8
1
vote
1 answer

Is there a way to put the text of a QCheckBox above the icon?

I have a gridlayout that holds a bunch of check boxes. I wanted to add an image to the check boxes as well as some text. The problem I am having is that the layout of a check box is left to right (check box, icon, text). Is there a way to put the…
Chris Mattmiller
  • 325
  • 3
  • 14
1
vote
3 answers

Associate signal and slot to a qcheckbox create dynamically

I've got a very specific problem so I'm going to try to be as clear as possible. I've got a QTabWidget which contains QTableWidget, every line of my QTableWidget is create dynamically by reading a file. As you may see, when I create a line, I add a…
Evans Belloeil
  • 2,413
  • 7
  • 43
  • 76
1
vote
1 answer

Items disappears from combo box when I read them from model

I have QComboBox and I set QStandardItemModel because I need multi-select check-boxes in it. Problem is that when I read text value and check state of items in comboBox, they disappear from combo. This is how I set model to comboBox: areas = ["Area…
Aleksandar
  • 3,541
  • 4
  • 34
  • 57
1
vote
2 answers

QStandardItemModel header with widget and text

i need to use checkbox with text, like this "Check all": in header of QStanndardItemModel. I tried like this QStandardItem* item0 = new QStandardItem("some text"); item0->setCheckable(true); item0->setCheckState(Qt::Checked); item0->setText("some…
Cherubim
  • 55
  • 2
  • 8
1
vote
1 answer

How i fill and remove dynamically dict for widget?

I have the following code: ##### Slots for checkboxes (enable/disabling) QtCore.QObject.connect(self.checkBox_3, QtCore.SIGNAL(_fromUtf8("stateChanged(int)")), self.checkBox_3.setOn) QtCore.QObject.connect(self.checkBox_3,…
PersianGulf
  • 2,845
  • 6
  • 47
  • 67
1
vote
1 answer

Which signal can tell me unchecked checkbox?

Suppose I have set of QCheckBoxes, I set some of them. I need to understand when I uncheck them, but I don't know which signal can help me? The following code tell me checked: QtCore.QObject.connect(self.checkBox,…
PersianGulf
  • 2,845
  • 6
  • 47
  • 67
1
vote
1 answer

how to change the color of tick in QCheckBox widget?

I want to change the color of TICK in the QCheckBox from black into dark blue, I tried QSS, but it doesn't work: QCheckBox { background-color:blue; color:blue; } Using QSS only change the background color, but I want to change the color of the…
nimbus_debug
  • 620
  • 2
  • 7
  • 17
1
vote
0 answers

Qt delegate not calling createEditor()

I have ComboBox filled with CheckBoxes when the ComboBox is opened the first item's delegate createEditor is not called but when you move to second item it is called and delegate is properly created. After this when you move back to first item then…