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

leftMargin(?) on a QTextBlockFormat causes incorrect layout - cursor drawn in wrong spot (through characters!)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.0.0
    • 4.8.1
    • GUI: Text handling
    • None
    • Windows 7, Visual Studio 2010

      I can make the cursor in the QTextEdit appear ON characters!

      If I have a QTextFrame with some padding, and a QTextBlock with a leftMargin then it lays out the text such that you can never put the cursor past some of the characters. Pressing left and right will move the cursor in memory (if I type it puts the character in the right spot), but the displayed cursor does not move. I've even had it where it draws the cursor through a character. It seems the layout does not properly take the leftMargin of the block into account. If I set the leftMargin of the block to zero, it draws fine. Probably a combination of frame and block formats causing the issue.

      I have recreated in a demo and have attached that to this bug report. It's just the SVG text demo with some extra bits added to demonstrate the issue.

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

            esabraha Eskil Abrahamsen Blomfeldt
            gemmell Simon Gemmell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes