from PySide import QtGui app = QtGui.QApplication([]) dial = QtGui.QDial() dial.show() app.exec_()
from PySide import QtGui class MyDial(QtGui.QDial): def __init__(self, parent=None): super(MyDial, self).__init__(parent) self.setRange(0, 100) self.setSingleStep(5) self.setNotchesVisible(True) app = QtGui.QApplication([]) dial = MyDial() dial.show() app.exec_()This example shows how to customize the QDial widget by creating a new class that inherits from QDial. The MyDial class overrides the constructor to set the range, step size, and visibility of the notches. Package library: PySide.