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

Qt Command Log using QListWidget

I am trying to build a command log on a user interface. Meaning, when the user click a button, check a box, upload some images etc, basically every time the user interacts with the user interface the action is recorded inside a QListWidget Command…
Emanuele
  • 2,194
  • 6
  • 32
  • 71
0
votes
1 answer

Call function when checkbox is checked

I want that when I have changed a line-edit another function gets called, and in that function there is an if-else with Qt.Checked. When I edit the line-edit and then check the checkbox, the text from the line-edit gets written to a variable. But…
jfr
  • 11
  • 4
0
votes
1 answer

Replace checkboxes accordingly to option chosen in QCombobox

I am trying to auto-populate a list of exclusive checkboxes where the number of checkboxes changes according the the option chosen in QComboBox. I'm stuck at the portion of how to remove the initially appended widgets in the layout and replace them…
Teh Ki
  • 455
  • 1
  • 3
  • 14
0
votes
1 answer

PyQT Fusion style removes checkboxes in checkable combobox

I created a checkable qcombobox using the following code. Then, I applied the fusion style to make my program look better. However, doing so results in the checkboxes next to the items in my code to no longer be visible. How can I fix that? class…
Osama Adel
  • 73
  • 1
  • 6
0
votes
3 answers

How to hide Qcheckbox when Qcombox box selects an item?

from PyQt5 import QtCore, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(762, 590) self.centralwidget = QtWidgets.QWidget(MainWindow) …
Sally
  • 87
  • 2
  • 10
0
votes
1 answer

Count number of QCheckBox checked in a layout - PyQt5

I need to count the number of QCheckbox checked in a layout (called "grid_checkbox"). My code has two steps. The first step consists to add QCheckbox and the second step consists to count those which are checked. def add_checkbox(self): for i in…
H. Dave
  • 549
  • 3
  • 9
  • 26
0
votes
1 answer

Pyside QTablewidget qcheckbox click event

I have added qcheckbox in first cell of qtablewidget now what I want is how to access checkbox and how to get its click event.Basically what I want is on checkbox check row should be selected and on unchecked row should be dis-selected. Here is…
0
votes
1 answer

Change QComboBox items with QCheckBox from different class

I am trying to figure out how to change the items in QComboBox from another class. I have tried several ways already including trying to populate the items from the other class as well. In my example below I am embedding the class Widget1 which has…
Richard
  • 445
  • 1
  • 5
  • 21
0
votes
1 answer

Cannot check item of QListView

I'm working on a dialog class with a QListView and a customized model inheriting QAbstractListModel. Items on my list are custom widgets with several labels. I managed to make a checkbox displayed for each item by reimplementing data(), setData()…
nmud
  • 175
  • 14
0
votes
1 answer

How to create a qcheckbox on a qtableview that gets data from an sqlite database

Am having a QTableView that shows data from an sqlite database. Apparently, am creating a checkbox on all available rows of data. The problem is that the checkboxes are not checkable and when clicked show the following error. if value.toBool(): …
And3r50n 1
  • 337
  • 1
  • 5
  • 21
0
votes
1 answer

Python PyQt5 loop checkbox values

I'm trying to loop over all the checkboxes in my PyQt5 gui. for i in range(2): self.checkbox+i This gives me the error 'Window has no checkbox attribute'. Window.checkbox doesn't indeed exist. It needs a number. I've tried multiple things…
Michel85
  • 307
  • 2
  • 11
0
votes
0 answers

QCheckBox does not update unless mouse over it again

I have a Qt Application built with Qt Creator. I have check boxes on different tabs of a QTabWidget, and it has a video display window. It is keeps my computer pretty busy. When I click on a checkbox, the check on the checkbox takes a while to show…
wainCam
  • 11
  • 2
0
votes
1 answer

qt signal-slot on QCheckBox(es) previously added recursively

I'm adding some checkBoxes recursively in tableWidget cells (always in column 1) on a specific function. The final nummber of those checkboxes is not defined and depends on the user input. QStringList matID; for(int i=0; i
piepolitb
  • 31
  • 4
0
votes
1 answer

CheckBox not visible inside ComboBox

I need my combobox items to be checkable by user so they can select multiple items. I've seen some solution on stackoverflow. I applied it to my code. It did something, but checkbox aren't visible yet and I'm not yet able to select any item. My code…
Vicspidy
  • 31
  • 1
  • 8
0
votes
1 answer

Check all checkBoxes inside of a checkable groupBox by checking and unchecking the GroupBox

I have a GroupBox and inside of it I have 6 checkBoxes. I want them to be checked when I check the GroupBox and unchecked when I uncheck the GroupBox, like toggling all of them. Something like: for box in…
james.rio
  • 23
  • 1
  • 5