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

QLineEdit::setcursorPosition( 0 ) does not repaint correctly the text if alignment changed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.1
    • 4.6.3
    • None
    • Windows 7 64b (reproduced on XP 32b) , VC 2008 SP1.

    Description

      QLineEdit::setCursorPosition( 0 ) shifts the text of the lineedit to the right, which leads to a bad display.
      This happens if the alignment of the QLineEdit has been changed.

      You can find attached a sample that reproduces the issue. The sample uses _sleep() and processEvents() to mimic what happens in our real program.

      if you comment the last setCursorPosition(0), the display is correct.

      Attached screenshot shows (left) the result ; if you resize the lineedit, it is displayed correctly (right).

      Attachments

        1. 18149.png
          18149.png
          9 kB
        2. main.cpp
          0.7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vfm Thierry Bastian (closed Nokia identity) (Inactive)
            sysedit Pierre-Nicolas Rigal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes