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

Why aren't my QRadioButtons 'exclusive' after being added to separate QButtonGroups?

from PySide import QtCore from PySide import QtGui class UI(QtGui.QDialog): def __init__(self): super(UI,self).__init__() self.setWindowTitle('Test UI 2000') self.create_layout() def create_layout(self): …
lulufinder
  • 25
  • 1
  • 4
2
votes
1 answer

Display QRadioButton as QPushButton like c#

In c# I can apply this property on RadioButton So the RadioButton is displayed like a PushButton but it's still a radio button. Is there a way to do that with Qt in c++ ? maybe programmaticaly.
amdev
  • 3,010
  • 3
  • 35
  • 47
1
vote
0 answers

If there is the only one QRadioButton, it works as QCheckBox

I need to add one or several radiobuttons (depends on registered GPU Models). It looks like: QVBoxLayout *vLayout = new QVBoxLayout(this); QList gpus = getGpus(); foreach (OpenCLGpuModel *gpu, gpus) { QRadioButton *rb = new…
Dmitrii
  • 618
  • 2
  • 7
  • 19
1
vote
1 answer

Is it possible to use custom scalable images for a QRadioButton?

With a simple QPushButton, if I want to use custom images while the size of the button is determined by a layout (so it can be scaled freely), the only possibility is to override border-image in the style sheet. If I add the image as an image…
vsz
  • 4,811
  • 7
  • 41
  • 78
1
vote
1 answer

QRadioButton how add a selection check?

On a selection check false i try to prevent the selection of that radiobutton. But it does get selected anyway, even with singleshot timer: class MyQWidget(QWidget): def __init__(self): QWidget.__init__(self) ... …
droid192
  • 2,011
  • 26
  • 43
1
vote
1 answer

Why does this code in PyQt allow me to leave all radio buttons unchecked?

I wrote a mini code using PyQt and I got surprised when I noticed that it allows me to leave all buttons on the left unchecked. I don't want this behaviour: one of them should always be selected. The right side of the window works, though. I don't…
Tendero
  • 1,136
  • 2
  • 19
  • 34
1
vote
1 answer

How does the Auto-Exclusion work with QRadioButtons with nested widgets?

I am building a QWidget with QRadioButtons at different levels. In other words, my widget contains some radio buttons and a subwidget (labeled groupBox in the screenshot) that also contains radio buttons. Here is my problem: the radio buttons…
Ben Jones
  • 652
  • 6
  • 21
1
vote
1 answer

QRadioButtons widget are linked on uniqueness

I have built a GUI window that is part of a project, and I need to have three separate groups of radio-buttons, each group must be independent in the uniqueness. I can't find the way how to separate the linkage between the radio-buttons. So only one…
Gabi Loebl
  • 15
  • 1
  • 4
1
vote
1 answer

Disable and enable radiobuttons from another radiobutton in PyQt4 Python

I have 3 radiobutton groups in forms of Yes or No. I want to disable the last 2 radiobutton groups if the first radiobutton is "No" and enable them when the first radiobutton is "Yes". I can make the enabled or disabled by default but toggling…
seyet
  • 1,080
  • 4
  • 23
  • 42
1
vote
2 answers

Nested structures with QRadioButtons

I would like to achieve something similar to this picture: except that the top level ("Adress bar", "forms" and "User names...") should be radio buttons. The idea is that the sublevels should get enabled or disabled depending on the state of the…
mimo
  • 2,469
  • 2
  • 28
  • 49
1
vote
1 answer

Automatically enabling different QPushbuttons according to QRadioButton options in PyQt

I am very new to PyQt, so I am not even sure where to start searching for this. So I have two different options for QRadioButtons which ideally will correspond to two QPushButtons, one each. Basically, I have the following code, where i tried to…
Helena K
  • 469
  • 2
  • 6
  • 15
1
vote
1 answer

Size of Qt QRadioButton able to get smaller, but not larger than default

I need to make the size of all radio buttons in my application larger...however, I can only seem to make them smaller. Using "QRadioButton::indicator{width: 13px;height: 13px;}" works...but only to make it smaller. When I try to go larger than…
user2494298
  • 299
  • 3
  • 7
  • 23
1
vote
1 answer

How to add value from multiple radio buttons into lcd pyqt?

Is there anyway I can make pyqt lcd display the total value of the radio buttons that are checked? Each radio button is assigned one value and checking some or all of them will add up the total value and display it in the lcd. Unchecking them will…
Viv91
  • 45
  • 2
  • 8
1
vote
1 answer

How to assign a value to a radiobutton in pyqt?

I want to assign a value to a radiobutton when it is checked. def radiobutton8(self): if self.radioButton_8.isChecked(): self.radioButton_8 = 02 However, this cannot work. Any solution? UPDATE: My code has been edited to be: class…
Viv91
  • 45
  • 2
  • 8
1
vote
1 answer

Add QRadioButton into QWidget without layout

I am trying to do something that I thought it would be terribly easy : Adding QRadioButton into my QWizardPage without any layout. The following code that adds QRadioButton is being called when user clicks button Next (signal currentIdChanged calls…
peterphonic
  • 951
  • 1
  • 19
  • 38