天天看點

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 用自己要顯示的字元串替代即可。

繼續閱讀