Output string with QTextStream : QTextStream « Qt « C++
- C++
- Qt
- QTextStream
Output string with QTextStream
#include <QTextStream>
#include <QString>
int main() {
const char* charstr = "this is one very long string";
QTextStream cout(stdout);
QString str = charstr;
cout << str << endl;
cout << "\nA\tb\\c\'d\"" << endl;
return 0;
}
Related examples in the same category