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 TextBrowser 中打印浮点变量?
最简单的解决方案:
double d = 3.1415 QTextBrowser b; b.append(QString::number(d));
你有没有尝试过这样的事情?
float f = 1.414213; QString fStr; fStr.setNum(f); QTextBrowser b; b.append(fStr);