Just like it it possible to write
std::string str(qstr.ascii());
QString qstr = "xxx";
std::string str(qstr.ascii());
To copy to clipboard, switch view to plain text mode
it is also possible to write
std::string str(qstr.latin1());
QString qstr = "xxx";
std::string str(qstr.latin1());
To copy to clipboard, switch view to plain text mode
What is the practical difference between these two? How do you know which one of the you should use? And what happens if you choose none of them, but instead uses
std::string str = qstr;
QString qstr = "xxx";
std::string str = qstr;
To copy to clipboard, switch view to plain text mode
? Is either ascii() or latin1() implicitly used to cast the QString to an std::string (and in that case, which one of them), or does the cast happen in some completely different way?
Bookmarks