[PyQt5] QLabel's setText text cannot be fully displayed

label1 = QLabel(self)
label1.setText("hello world")

Problem: These two lines of code alone cannot make the text fully displayed (as shown in the figure)

Modification 1: Add a line label1.adjustSize() after

Modification 2: Set the size of the label label1.resize(200,100)

Guess you like

Origin blog.csdn.net/xucanlax/article/details/125298447