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, QRadioButton and QComboBox in QWizard: Signals/ Slots and SignalMapping - Information required

I am trying to create a QWizard. I need to use combinations of QRadioButton and QComboBox in first Window, and QCheckBox and QComboBox in second Window. In the first Window, the information coming as text per RadioButton is from Directories in a…
abhi abhi
  • 181
  • 1
  • 2
  • 10
1
vote
0 answers

Display enabled QCheckBox as disabled

I use a QTreeView with a TreeModel (that inherits QAbstractItemModel). The TreeModel::flags() function returns Qt::ItemIsUserCheckable and therefore a checkbox is displayed besides every item in the view. What I need to do is display the checkbox…
apon
  • 85
  • 1
  • 10
0
votes
1 answer

How to identify the checked checkbox in a PySide2 QListWidget

I'm trying to find the checked item in a QListWidget, however, I'm not sure how to identify the one being checked because I'm not using a name for each individual checkbox. Basically, I have multiple unknown strings, which are made into checkboxes…
0
votes
0 answers

Why is QCheckBox checkmark so small?

I am using Qt version 4.7.4 to build a Windows app. The checkmark in a QCheckBox is very small and is left-top aligned in the corner. Here is a snippet of a QCheckBox in my app. And, the problem is not just with my app. When I use the Qt Designer…
Mike Finch
  • 746
  • 1
  • 7
  • 20
0
votes
0 answers

Qt QListWidgetItem return the checkbox value

screen capture for cannot return the checkstate of the items I have difficulties to get the state of the checkbox. The code below that can create a clickable checkbox for me. However, I cannot read back the State of the checkbox. void…
0
votes
1 answer

Qt Qcheckbox - how to style the tick sign

My setup is Raspberry Pi, Python 3.9.2, Pyside2, Qt Designer. The original (without style) QcheckBox size is too small for my design, So I increased its size with width= and height= (seen here Increase check box size not its text using QCheckbox? )…
0
votes
2 answers

PySide6 QCheckBox stateChanged() generates state event int instead of Qt.CheckState

PySide6 6.4.1 PIP on Ubuntu and Windows contains a QCheckBox with stateChanged() API call to generate an event when the checkbox state changes. QCheckBox documentation: state contains the checkbox’s new CheckState. PySide6.QtCore.Qt.CheckState…
Erriez
  • 53
  • 5
0
votes
0 answers

pyqt checkbox resolution for different scales

I am developing a windows app with pyside6. I have a QTableView and have used a QItemDelegate to add checkboxes to the table. The checkboxes are drawn in the paint method of the QItemDelegate, using the method drawCheck class…
aescarve
  • 3
  • 3
0
votes
1 answer

PyQt5 QCheckbox with image

Is there a way to implement checkbox with image? I want to create side bar with the list of checkbox with images, like i did it here with html, css and js: The style is not important, first of all I want to know how to make the functionality.…
Rimuto
  • 33
  • 4
0
votes
0 answers

Get row and column when checkbox clicked in QtableView

I have a QtableView with data from a file. I added 3 columns with checkboxes, but now I need to know what checkbox is clicked (Row, column, data). This is working for the cell itself but when clicking the checkbox it gives the latest data or if no…
Michael
  • 3
  • 5
0
votes
1 answer

How to remove padding of QCheckBox in a QTreeWidget cell

I've subclassed QWidget and used setItemWidget to set it as a cell widget. Here's the code for the subclass from PyQt5.QtWidgets import QWidget, QHBoxLayout, QCheckBox, QLabel from PyQt5.QtCore import Qt class QFrozenWidget(QWidget): def…
Korcan Karaokçu
  • 467
  • 4
  • 18
0
votes
1 answer

PYQT5 QRadioButton, QCheckBox color

I'm using radio buttons and checkboxes and I was wondering if there was a way to change the color of the border around the checkmark/radio indications. The reason is because when I switch to dark mode on my layout, the border is no longer…
0
votes
0 answers

Python3 PyQT5 Create multiple QCheckBox widgets in a while loop

Need some guidance on adding multiple QCheckBox items to a QGridLayout in a while loop that is processing data returned from a database. I have created a window with tabs that identify product categories. Each tab contains a grid layout of products.…
Loren P
  • 11
  • 1
0
votes
1 answer

vue test utils how to find specific input[type="checkbox"?

I am using Quasar 2 Vue 3 and @quasar/testing-e2e-jest v3.0.0-alpha.10. I have multiple q-checkbox in my vue component template which I decorated with data-test attribute. How do I find the specific checkbox with wither id, name, and/or data-test?…
Kok How Teh
  • 3,298
  • 6
  • 47
  • 85
0
votes
1 answer

How to place the checkbox of a QCheckBox widget on the right, and text left-justified

Does Qt offer a way to configure the layout of a QCheckBox with Qt Stylesheets so that the text remains aligned to the right but the checkbox is placed on the far right?
RAM
  • 2,257
  • 2
  • 19
  • 41