Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所有 Qt 小部件都有一个替换现有文本的 SetText 和一个在添加 QString 之前添加新行的追加,但是有什么方法可以连接文本吗?
您可以使用以下方法手动完成setText():
setText()
widget->setText(widget->text() + "new text");