Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.3.4
-
None
Description
Calling toHtml() on a QTextEdit and set this on a new QTextEdit does not keep the initial format.
#include <QtGui>
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTextEdit w, w2;
w.show();
a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
QTextCursor cursor(w.textCursor());
cursor.movePosition(QTextCursor::Start);
QTextTableFormat tableFormat;
tableFormat.setHeight(150);
QTextTable *table = cursor.insertTable(2, 2, tableFormat);
w2.setHtml(w.toHtml());
w2.show();
return a.exec();
}