How to convert int to QString?

后端 未结 8 835
面向向阳花
面向向阳花 2021-01-29 18:36

Is there a QString function which takes an int and outputs it as a QString?

8条回答
  •  礼貌的吻别
    2021-01-29 19:03

    Just for completeness, you can use the standard library and do QString qstr = QString::fromStdString(std::to_string(42));

提交回复
热议问题