Python Forum
[PyQt] how to deselect radiobutton in pyqt5
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] how to deselect radiobutton in pyqt5
#3
to solve the problem; I proceeded as follows: I group my radiobuttons in a QButtonGroup into Qt Designer, like that :

Quote:"Select the ones you want to group, and right click on one of them. Then, you'll find an option to "group" the buttons. If you click that, you will notice that a new QButtonGroup has appeared in your object browser in designer. You can select that button group to give it a name, make it exclusive"

Then, I integrated the following code in my function ;

self.checkbox_confirmed .setCheckState(Qt.Unchecked)
self.buttonGroup_unite_mesure.setExclusive(False)
self.radioButton_degre.setChecked(False)
self.radioButton_ddm.setChecked(False)

self.buttonGroup_unite_mesure.setExclusive(True)
thanks for the previous code posted by Denni, which gave me an idea how to solve my problem
Reply


Messages In This Thread
how to deselect radiobutton in pyqt5 - by atlass218 - Oct-22-2019, 12:36 PM
RE: how to deselect radiobutton in pyqt5 - by Denni - Oct-22-2019, 04:04 PM
RE: how to deselect radiobutton in pyqt5 - by atlass218 - Oct-23-2019, 06:29 AM
RE: how to deselect radiobutton in pyqt5 - by Denni - Oct-23-2019, 03:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to dynamically change radiobutton text kenwatts275 2 3,322 Mar-05-2021, 02:25 AM
Last Post: deanhystad
  Python3 tkinter radiobutton problem Nick_tkinter 14 5,976 Feb-15-2021, 11:01 PM
Last Post: Nick_tkinter
  [Tkinter] RadioButton Maryan 2 2,159 Oct-23-2020, 09:36 PM
Last Post: Maryan
  [Tkinter] How to create radiobutton in numpy gui python? luthfidali 2 2,595 May-23-2020, 10:35 AM
Last Post: timo
  Tkinter: increasing numbers and Radiobutton issue PeroPuri 1 2,157 Apr-13-2020, 05:48 PM
Last Post: deanhystad
  Huge code problems (buttons(PyQt5),PyQt5 Threads, Windows etc) ZenWoR 0 2,814 Apr-06-2019, 11:15 PM
Last Post: ZenWoR
  [Tkinter] Clicking a RadioButton in a for Loop & Getting the Appropriate Return Vicolas 1 5,153 Feb-02-2019, 01:53 AM
Last Post: woooee
  [Tkinter] Radiobutton in Tkinter not Updating Variable from Value Aidan54321 1 7,350 Jun-16-2017, 11:08 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020