Actually, there's a slight difference:
[html]
______________
| saddsadsa|
| asdds|
| dfds|
|_____________|
[/html]
vs.
[html]
______________
| saddsadsa|
| asdds |
| dfds |
|_____________|
[/html]
You can do the latter with the help of tables:
#include <QtGui>
int main(int argc, char *argv[])
{
format.setAlignment(Qt::AlignRight);
QTextFrame* frame
= edit.
textCursor().
insertTable(1,
1, format
);
cursor.insertText("saddsadsa\nasdds\ndfds");
edit.show();
return a.exec();
}
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTextEdit edit;
QTextTableFormat format;
format.setAlignment(Qt::AlignRight);
QTextFrame* frame = edit.textCursor().insertTable(1, 1, format);
QTextCursor cursor(frame);
cursor.insertText("saddsadsa\nasdds\ndfds");
edit.show();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks