0
How do I display a integer value ( from a function) in a TextEdit box in Qt?
I have a TextEdit box in my Qt GUI and I'm trying to display an integer value in it from a function when a button is pressed in the GUI. My person class has Age as a private data member and has public getters and setters. setText only takes QString as an argument https://code.sololearn.com/cvJcB0D69dYI/?ref=app
1 Antwort
0
You can create a QString from a std::string, with that method you can use std::to_string to convert an int to a string and then to a QString