Hi All,
In my QT application ( QT 4.5.1 & Windows XP , SUSE Linux) I am formatting the string using std formatting functions (e.g std::setw() )
But when I fomratted required string and put it on QTextEdit to display the formatting doesnt get apply But if same string I see using std::cout I see the formatting is correctly applied. Can you tell me how to apply formatting in QTextEdit.
e.g.
std::stringstream ss;
ss << std::left << std::setw(40) << "Values" << std::setw(40) << "Keyword/Constant" << std::endl;
ss << std::left << std::setw(40) << "One" << std::setw(40) << "One" << std::endl;
ss << std::left << std::setw(40) << "Four" << std::setw(40) << "Four" << std::endl;
ss << std::left << std::setw(40) << "Three" << std::setw(40) << "Three" << std::endl;
cout << ss.str(); //Works fine
textEdit->setPlainText(QString::fromStdString(ss.str())); // Formatting doesnt apply
Bookmarks