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

Line spacings of text blocks can not be saved to file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 4.8.6, 5.7.0
    • GUI: Text handling
    • None
    • System: RHEL6,
      Compiler: gcc 4.4.7
      Qt version: 4.8.6

      If I set line spacing in block with QTextBlockFormat::setLineHeight(qreal, int) it takes an effect I need: distance between lines in block becomes wider or more narrow. But if I want to save it to html file (e.g. with QTextDocumentWriter) and load it again then information about line heights is not saved. According to this: http://doc.qt.io/qt-4.8/richtext-html-subset.html#block-attributes (for 4.8.6) and http://doc.qt.io/qt-5.7/richtext-html-subset.html#block-attributes (for 5.7.0) there is no block property representing distance between lines in supported HTML subset like line-height for <p>-tag (see picture below).

      Linespacings are not exported to ODF format either.

      Here are pictures with editing result, HTML code of saved file's body and loading result.

        1. spacings.png
          48 kB
          Anton
        2. spacings_after_loading.png
          19 kB
          Anton
        3. saved_doc.png
          41 kB
          Anton
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            esabraha Eskil Abrahamsen Blomfeldt
            toniy Anton
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes