PyQT QRadioButton is a simple radio button. This is typically used when only one option is possible, as opposed to a checkbox.

In qt the checkbox always has the round button and the label like QRadioButton("Australia").

Download Examples:
Download PyQt examples

Radio Button

PyQT radio button example

The code below creates 3 radio buttons. It adds 3 radio buttons to a grid.
If you click on any of the radio buttons, it calls the method onClicked(). The radio button is connected to that method using radiobutton.toggled.connect(self.onClicked).

from PyQt5.QtWidgets import *
import sys

class Window(QWidget):
def __init__(self):
QWidget.__init__(self)
layout = QGridLayout()
self.setLayout(layout)

radiobutton = QRadioButton("Australia")
radiobutton.setChecked(True)
radiobutton.country = "Australia"
radiobutton.toggled.connect(self.onClicked)
layout.addWidget(radiobutton, 0, 0)

radiobutton = QRadioButton("China")
radiobutton.country = "China"
radiobutton.toggled.connect(self.onClicked)
layout.addWidget(radiobutton, 0, 1)

radiobutton = QRadioButton("Japan")
radiobutton.country = "Japan"
radiobutton.toggled.connect(self.onClicked)
layout.addWidget(radiobutton, 0, 2)

def onClicked(self):
radioButton = self.sender()
if radioButton.isChecked():
print("Country is %s" % (radioButton.country))

app = QApplication(sys.argv)
screen = Window()
screen.show()
sys.exit(app.exec_())