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.
我尝试使用在两行之间嵌入 \n 的字符串,但这不起作用。
换行符似乎有效:
#include <QtGui> int main(int argc, char **argv) { QApplication a(argc, argv); QGroupBox gb("This is the first line\nAnd this is line 2\nAnd 3"); gb.show(); return a.exec(); }
在 Mac 上用 Qt 4.8 和 Qt 5 给我这个: