I want to print the value of a variable(integer) on (say) a label in Qt.......
How can i do it??
I want to print the value of a variable(integer) on (say) a label in Qt.......
How can i do it??
You can convert integer type to QString type using QString::number().
qt_user (6th August 2010)
thanx a lot.....can I also do something like "stament to be printed " variable1 "more statments" variable2.............. as in C language??
You can look at http://doc.trolltech.com/4.6/qstring.html#arg.
or simple use + to concat strings
No, and thats not C language (unless variable1 and variable2 are #define's containing text)
But you can do:
Qt Code:
To copy to clipboard, switch view to plain text mode
Assuming variable1 and variable2 and also QString's.
Bookmarks