Questions tagged [qradiobutton]

The QRadioButton widget, part of the Qt framework, provides a radio button with a text label.

The QRadioButton widget, part of the Qt framework, provides a radio button with a text label.

A QRadioButton is an option button that can be switched on (checked) or off (unchecked). Radio buttons typically present the user with a "one of many" choice. In a group of radio buttons only one radio button at a time can be checked; if the user selects another button, the previously selected button is switched off.

Source: QRadioButton class reference

71 questions
5
votes
1 answer

pyQt Radio Buttons: Adjusting size of buttons and text

I'm trying to adjust the size of both the button and the text of a radio button widget in PyQt, with no luck at trying to do both. With this bit of code: radioButton = QRadioButton(options[x]['desc']) radioButton.setStyleSheet('font: 16pt…
Dave Reid
  • 175
  • 1
  • 2
  • 5
5
votes
2 answers

QGroupBox find selected Radio Button

I have created a simple UI consisting of a QGroupBox with a bunch of QRadioButtons (32 to be exact) and I want to be able to find the selected one. I've looked at forums and things, but the answers I've found don't work, and one referenced…
Oliver
  • 1,576
  • 1
  • 17
  • 31
5
votes
1 answer

Get the list of all QPushButton in Qt

I would like to get the list of all QPushButton in my MainWindow. Actually, I have a QRadioButton, and when I uncheck it, I would like to disable all the QPushButton of my window. How can I do that ?
iAmoric
  • 1,787
  • 3
  • 31
  • 64
4
votes
2 answers

How to make color for checked QRadioButton but looks like standard?

I know many people asked this question. I also searched it here already. One of easiest solutions is with stylesheet: QRadioButton { background-color: rgb(252,254,252); color: black; } QRadioButton::indicator { width: 11px; height:…
gnase
  • 580
  • 2
  • 10
  • 25
4
votes
1 answer

How to uncheck a checked radio buttons in pyqt4

Im making a quiz and after my next button is pressed i want the the radio buttons to be unchecked but this isnt happening. Here is where i put the radio buttons. self.answers = QtGui.QButtonGroup(self) self.Correctanswer =…
Spike7
  • 128
  • 1
  • 4
  • 15
3
votes
1 answer

Multiple Radio button groups are linking, causing strange behavior

My program generates forms on the fly based on SQL data. I make two radio buttons and a QLineEdit entry right next to them. When the radio button on the right is checked, the QLineEdit is enabled correctly. The problem comes from the radio buttons…
Lacrosse343
  • 491
  • 1
  • 3
  • 18
3
votes
2 answers

Qt - iterating through QRadioButtons

I have a group project for school that I am working on. A member of my group has created a window that has ~75 radio buttons. I want to force all of them to be "clear" or "unchecked" on a button press. Does anyone know a good way to go about doing…
Nedlinin
  • 881
  • 2
  • 12
  • 21
3
votes
2 answers

qradiobutton issue

i have a problem with radio button. I've created a groupbox with two radio buttons and set it exclusive so when one is checked the other one is unchecked. when i check one it connects to a slot that as a function so it does an action, more…
SamuelNLP
  • 4,038
  • 9
  • 59
  • 102
2
votes
3 answers

Toggling a QRadioButton in pyqt5: uncheck when a checked radio button is clicked

I'm using some QRadioButtons inside a QButtonGroup in pyQt5. I would like the user to be able to select one of the exclusive options or none, so if he accidentally clicks a radio button, he should be able to click it again to uncheck it. My current…
dvilela
  • 1,200
  • 12
  • 29
2
votes
1 answer

How to make QRadioButton clickable area the whole button instead of just on the text

I'm using PySide2, within maya 2018, if that matters. A QRadioButton will respond only if clicked in the area of the text, even if the button's rectangle is larger. A QPushButton can be clicked anywhere in its rectangle and it will respond. Can I…
smeet
  • 23
  • 2
2
votes
2 answers

PyQt working with wizard and radio button

I made this wizard containing a radio button. When it is clicked, the finish button should return a list of radio buttons that were checked as text! The input (it's virtual input for readability) data=[['a','b','c'],['e','f'],['g','f']] data1 =…
baha joher
  • 84
  • 8
2
votes
1 answer

Making PyQt QRadiobutton across multiple layout exclusive

I am trying to create radio buttons with only one being active at any one time. I have tried using the QButtonGroup and setting it Exclusive. However it doesn't seem to work. My code is as below: from PyQt4 import QtGui, QtCore import sys class…
Chris Aung
  • 9,152
  • 33
  • 82
  • 127
2
votes
1 answer

PyQt [QTreeWidget]: How to add Radiobutton for items?

To this question I am referring to the answer from @Andy PyQt Tree Widget, adding check boxes for dynamic removal There @Andy shows how to add CheckBox into the QTreeWidget, which works perfect. I would like ask here, how to add RadioButton into…
Rt Rtt
  • 595
  • 2
  • 13
  • 33
2
votes
1 answer

Updating a PyQt QLabel when a QRadioButton associated with a QComboBox is toggled

I have a QPixmap within a QLabel that is changed based on a QComboBox selection. For example, the combobox may have a selection of fruits (e.g., 'apple', 'orange', 'banana'). If I choose 'apple' an image of an apple is displayed in the QLabel. I…
zachn
  • 35
  • 3
2
votes
2 answers

QT5 Radio button signal not compatible with function, even though it should be

According to the QT5 docs, the QRadioButton inherits the 4 signals from QAbstractButton, which includes the clicked signal. The template for it is clicked(bool checked = false) so I'm confused why this code returns a long error message, part of…
niraami
  • 646
  • 8
  • 18
1
2 3 4 5