label中
显示的是1% is there!,为什么字符串John没有代替1% ???
- #include <QApplication>
- #include <QLabel>
- int main(int argc, char *argv[])
- {
- QApplication a(argc, argv);
- QString str = QString("1% is there!").arg("John");
- QLabel label(str);
- label.show();
- return a.exec();
- }