# import it from PyQt5.QtWidgets and radioBtn=QRadioButton("Button1") radioBtn.toggled.connect(lambda:self.myMethod()) # Example is at link below: ''' https://gist.github.com/Orizzu/fbbd473becb6d7f1a598c12915f37c52 '''
Here is what the above code is Doing:
1. Create a radio button.
2. Connect the radio button to a method.
3. When the radio button is clicked, the method is called.
4. The method checks to see if the radio button is checked.
5. If the radio button is checked, it prints a message.
6. If the radio button is not checked, it does nothing.