Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-1819

toHtml does not keep the format

    XMLWordPrintable

Details

    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();
      }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes