QLabel of QT Learning

set text

mylbl->setText("Hello QT! Hello QT!");

Dynamically resize based on text

mylbl->adjustSize();

Position center display: use horizontal layout and spacer control

 The effect is as follows:

 

Guess you like

Origin blog.csdn.net/auccy/article/details/132132889