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

How to connect two QLineEdit to have the same inputs (controlled by a QCheckBox)

I have two line-edits (le_A and le_B) that only take numeric values and a check-box (chk_box). I am having issues in getting le_A and le_B to have the same inputs (see Scenario 2 below) whenever chk_box is checked (where chk_box is the…
Teh Ki
  • 455
  • 1
  • 3
  • 14
1
vote
2 answers

How i can use in text description from QCheckbox?

I want to use the HTML ui->FresBox->setText("fres"); but it does not work in a QCheckbox. It works fine if you use a label. What is the different and how can I use the HTML style in a QCheckbox.
1
vote
1 answer

Is the a way to check a QCheckBox with a key press?

I'm working in PyQt5 and would like to be able check/uncheck a QCheckBox on a key prespress like with a QPushButton. I've checked the documentation and Google but cannot find a way to do this.
user8565662
  • 127
  • 1
  • 1
  • 6
1
vote
1 answer

TriState QAction in QMenu

I'm in need of a checkable QAction, that has besides the modes checked and unchecked the option of a partially check. This is basically already what QCheckBox provides, but unfortunately, QAction doesn't provide. As a first attempt, I came up with…
Aleph0
  • 5,816
  • 4
  • 29
  • 80
1
vote
1 answer

Align QCheckbox text and a QLabel underneath it

I have a checkbox with some text and I have a label underneath this checkbox. How can I align this label so it aligns with the text on the checkbox. What I want: [ ] insert_text some_text What I have: [ ] insert_text some_text
user4501385
1
vote
1 answer

PyQt QAbstractTableModel checkbox not checkable

I am using own table model with QAbstractTableModel, where I have first col with checkbox (checkable cause flags Qt.ItemIsUserCheckable | Qt.ItemIsSelectable | Qt.ItemIsEnabled). I have trouble when I am trying use checkboxes, cause they are not…
Dave
  • 87
  • 9
1
vote
2 answers

Qt text alignment in QCheckBox

I am looking for a way to align text in a QCheckBox to both the right and left side. I cannot seems to find any ways to modify just the alignment of the text and not the checkbox itself.
madasionka
  • 812
  • 2
  • 10
  • 29
1
vote
1 answer

Qt Align QCheckBox to the top of the text

I looking for a way to align the QCheckBox box on the top of the text. The text is very long and I would like it to be aligned with the first line. I think by default it is vertically centered with the text. This seems pretty easy, but I can't find…
madasionka
  • 812
  • 2
  • 10
  • 29
1
vote
1 answer

PyQt : How to use the QCheckBox.isChecked() method

The Below code is written to select the seats in an auditorium screen.. As I select the CheckBox i need the result to be displayed(Price of the Ticket) and also when I try to uncheck the CheckBox the result should be subtracted and displayed,…
1
vote
1 answer

When one checkbox is checked, by pressing a button to print some texts from a LineEdit if another checkbox is also checked

import sys, os import PyQt4 from PyQt4 import QtGui, QtCore from PyQt4.QtCore import * from PyQt4.QtGui import * class Tab1Widget1(QWidget): def __init__(self, parent=None): super().__init__() self.Tab1Widget1initUI() …
ryan9025
  • 267
  • 6
  • 17
1
vote
2 answers

How to disable a QPushButton when deselect a QCheckBox

I'm working in a Qt project where the user can enable or disable a QPushButton by selecting or deselecting a QCheckBox. I have already developed a function where the mouse event enable the QPushButton, but the problem is that when i deselect the…
user5031334
1
vote
1 answer

QCheckbox: stateChanged signal not emitted

I have the following situation in my QT Slot function for stateChanged signal: void ui::myslot(int state) { ... if (condition) { checkbox->setChecked(true); } ... } In case my checkbox is already checked and when I try to uncheck it,…
Leta
  • 331
  • 1
  • 4
  • 16
1
vote
1 answer

In PyQt, how to pass different properties of QCheckBox

builing on teh following example, how can i pass/access more properties then the 'state' of the QCheckBox? In this case I am looking to build a more dynamic function that can be used for multiple buttons and saves all status in a dict. something…
Tobias
  • 59
  • 5
1
vote
2 answers

Combine PyQt4 CheckBox Functions into single function

I've been working on an XCOPY GUI and I added in check boxes to select the desired xcopy switches. I have it all working, but I'm trying to condense the code as I'm sure there is a way to do it, I'm just not sure how. Basically, for each switch (E,…
Nick Biolo
  • 35
  • 1
  • 5
1
vote
1 answer

connecting to stateChange events for dynamicallly created QCheckBoxes

I am working on a Python application that plots data from a large file containing records from lots and lots of sources. One of the options I am trying to give the user is the option to only plot for a subset of these sources if so desired. I…