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

PyQt4 Qtreewidget - get hierarchy text if child checkbox is checked

What I am currently trying to do is take a populated tree (qtreewidget) that has checkboxes at the bottom child level, and return the text of the path to the child if the box is checked. The reason I want to do this, is if a child is checked, it…
2
votes
3 answers

Disable user to click over QTableWidget

I have QTableWidget with CheckBoxes in some cells. I want to disable user to perform mouse click over the table cells (so he can't change checkBox state) for some time while I am using data from the table. I've tried table.setDisabled(1) but that…
Aleksandar
  • 3,541
  • 4
  • 34
  • 57
2
votes
2 answers

Python3 PyQt4 Creating a simple QCheckBox and changing a Boolean variable

So I have been trying to write a GUI using Python 3.3 and PyQt4. I have been through a few tutorials and I still can't figure out how to have a Checkbox checking and unchecking trigger change in a global variable. I can't get it to trigger anything…
Lex
  • 65
  • 1
  • 3
  • 9
1
vote
1 answer

Save state of QTableWidget cell widget checkbox before setting its state

I have a QTableWidget, where one column is filled with custom checkboxes. Also, I have implemented an undo mechanic so that every change to the table can be undone. For the other item columns, where only text is stored, I basically achieve it in the…
Bakefish
  • 81
  • 6
1
vote
1 answer

Vue Js paragraph display -> ok but checkbox doesn't works

I need call 3 times the same POST API call on mounted and get the response. The response of api is stored on vuex. If i do paragraph that works: {{answer1}} // displayed 2 {{answer2}} // displayed 1 {{answer3}} // displayed 0 but my checkbox doesn't…
Syl
  • 21
  • 5
1
vote
1 answer

How to connect checkboxes to a QComboBox

I would like to filter the items in a PyQt5 QCombobox when checking certain checkboxes. Example: samplelist=["a1","a2","a3","b1","b2","b3"] is the list of items of the QCombobox comboBox and I have two checkboxes checkBoxa and checkBoxb.…
Omega
  • 19
  • 2
1
vote
1 answer

Get state of checkbox cellWidget in QTableWidget PyQT

I work on python plugin for QGIS. In this plugin I have created a QTableWidget with 3 columns. These columns are QCheckbox, QTableWidgetItem and QComboBox. I would like to retrieve the values contained in these 3 columns. For the moment I managed to…
1
vote
1 answer

How to get QTreeWidget item's text, when a checkbox within is toggled?

I've made a QTreeWidget that has a number of rows, each row with a text item, and a checkbox. How do I get the text, when the checkbox is toggled? I know that I can use currentItem() to get the currently selected TreeWidgetItem, but the row isn't…
Jesse
  • 143
  • 1
  • 1
  • 10
1
vote
2 answers

Change QCheckBox Style in Qt Jambi

I am currently using Eclipse 3.5.2 and Qt Jambi 4.7.2 in Ubuntu 11.04 Natty Narwhal I am trying to use stylesheets to customize my QCheckBox. I have found examples for C++ but I cannot find equivalents for Java. I am wanting to do something similar…
Tiffany
  • 45
  • 1
  • 6
1
vote
0 answers

How to set the stretch factor of the indicator of a QCheckBox?

As a basic example, from PySide2.QtWidgets import QApplication, QDialog, QCheckBox, QHBoxLayout import sys app = QApplication([]) window = QDialog() layout = QHBoxLayout() check = QCheckBox('Checkie…
Mxt
  • 166
  • 2
  • 17
1
vote
1 answer

unselect and select all checkboxes in PyQt5

similar to Python PyQt - Checkbox to uncheck all other checkboxes I want to have a checkbox to unselect all selected checkboxes. And a checkbox to select all checkboxes import sys from PyQt5.QtCore import Qt from PyQt5.QtWidgets import…
sticki
  • 43
  • 1
  • 8
1
vote
1 answer

QCheckbox to add and remove items from a list

I'm building a user interface with PyQt5 (and python 3.7) which I'm using a check box to add elements in a general list (input_columns_general) when it's checked and remove/delete then when unchecked. Every time when I check a check box the added…
wNakano
  • 39
  • 5
1
vote
1 answer

Get state from QCheckBox inside QTableWidget cell

I want to get a state from QCheckBox inside QTableWidget cell. I've made example code for this issue. import sys from PyQt5.QtCore import Qt, QSettings from PyQt5.QtWidgets import QApplication, QWidget, QHBoxLayout, QVBoxLayout from PyQt5.QtWidgets…
HoYa
  • 324
  • 3
  • 17
1
vote
1 answer

Background color of QCheckBox differs when checked by user vs when python code sets it checked

Summary of problem: Two of the three checkboxes above have checkmarks. In one, the value was set with Python code self.setwithPythoncode.setChecked(True)whereas the other was set by the user clicking on the box while the app was running. Actual…
WesR
  • 1,292
  • 1
  • 18
  • 30
1
vote
2 answers

Send state of a QCheckBox and a number when clicked

I'm trying to pass two separate variables via a QCheckBox clicked signal: its post-pressed state, and its index in the list. For example, this is my code: # pip install pyqt5 from PyQt5.QtMultimediaWidgets import * from PyQt5.QtMultimedia import…
JareBear
  • 467
  • 9
  • 27