Hello;
I created radiobuttons (radioButton_degre, radioButton_ddm), checkBox(checkbox_confirmed) and a button "Reset" (pushButton_reset) with Qt Designer
when I click on the button, I want all radiobouttons and checkbox to become unselected.
the fonctions display_degre_unit and display_ddm_unit are not defined, to reduce the code for a simplified code
thanks for help
I created radiobuttons (radioButton_degre, radioButton_ddm), checkBox(checkbox_confirmed) and a button "Reset" (pushButton_reset) with Qt Designer
when I click on the button, I want all radiobouttons and checkbox to become unselected.
the fonctions display_degre_unit and display_ddm_unit are not defined, to reduce the code for a simplified code
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# PyQT5 :
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
class MainApp(QMainWindow,FORM_CLASS) :
def __init__(self,parent=None) :
super(MainApp,self).__init__(parent)
QMainWindow.__init__(self)
self.setupUi(self)
self.pushButton_reset.clicked.connect(self.initialize)
self.radioButton_degre.toggled.connect(self.display_degre_unit)
self.radioButton_ddm.toggled.connect(self.display_ddm_unit)
def initialize(self):
self.checkbox_confirmed.setCheckState(Qt.Unchecked)
self.radioButton_degre.setChecked(False)
self.radioButton_ddm.setChecked(False)
def main():
app=QApplication(sys.argv)
window=MainApp()
window.show()
app.exec_()
if __name__=='__main__' :
main()It works for the checkbox but does not work for radiobuttonsthanks for help
