how to converting an int to a QString?
Solved
General and Desktop
-
Hello there, i need a call of QLabel.setText() which displays an int type.
I have tried:my_label->setText( QString(std::to_string(my_int)));
and got this error message:/home/sven/develop/Qt/tictactoe/configurationdialog.cpp:40: error: no matching function for call to ‘QString::QString(std::__cxx11::string)
I have no clue how i could convert ad hoc from 'int' to 'QString'.
^
-
-
@raven-worx
Should be rather
QString::setNum(), or at my case: QLabel::setNum() -
<Rude>http://bfy.tw/7VrJ</Rude>