天天看点

QT中QLabel设置首行缩进

最近用QLabel显示文字,需要设置首行缩进,发现网上资料很少,特来分享一下代码。

QString style="<p style=\" margin-top:px; margin-bottom:px; margin-left:px; margin-right:px; text-indent:px;\">something to show</p>";
           

其中something to show 用自己要显示的字符串替代即可。

继续阅读