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

TextEdit.textDocument loads according to mime type regardless of TextEdit.textFormat

    XMLWordPrintable

Details

    • fdbacf2d5 (dev), 71f61f903 (6.7), bc1bdd0e1 (dev), 206a1fa2a (6.7), 6b8bf79a5 (6.7.0)

    Description

      So we can fix that: QQuickTextDocumentPrivate::load() can check editor->textFormat().

      The next problem then is a sort of initialization race condition:

      TextEdit {
             textDocument.source: "whatever.md"
             textFormat: TextEdit.PlainText
      }
      

      textFormat might not be set yet at the time that QQuickTextDocumentPrivate::load() runs. So it needs to be delayed. A workaround is to set source in Component.onCompleted.

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: