pyqt5 set text alignment right code example Example: qlabel alignment center python self.label.setAlignment(Qt.AlignCenter)