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

Line spacings of text blocks can not be saved to file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • 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

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes