I want to insert '...' string at the end of label if inner text is too large to display in one line. Now. It displays 'this is my shcool tea' I want to change 'tea' to '...' automatically. is there any function in python?
  class MainWindow(QMainWindow):
    def __init__(self):
        super(MainWindow, self).__init__()
        lable = QLabel(self)
        lable.setText('this is my school teacher')
    def enterEvent(self,event):
        pass
    def mousePressEvent(self,event):
        self.calc()
    def calc(self):
        pass
if __name__ == "__main__":
    app = QApplication(sys.argv)
    mw = MainWindow()
    mw.show()
    sys.exit(app.exec_())
Important is to deal with several font.
 
    