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

QML Dialog with a ScrollView with a TextArea is rendered incorrectly



    • Bug
    • Status: Reported
    • P2: Important
    • Resolution: Unresolved
    • 5.15
    • None
    • Quick: Dialogs
    • None
    • Seen on Ubuntu 20.04 with Qt 5.15 / Qt creator 5.0.2.
      Reproduces both on Desktop linux and Android.
    • Android, Linux/X11


      Attached is a simple application that on request loads a QML dialog, that has a ScrollView, which has a TextArea with a long text. The bug is related to the way the Dialog adapts to its contents, the idea being that for a long content, the dialog resizes itself to fit more text.

      However, it seems that after increasing the size of the Dialog, the ScrollView/TextArea is still rendered only partially, i.e. for that area that they occupied before increasing the size of the Dialog. Only after the user scrolls/flicks the contents of the TextArea, then they start getting rendered correctly. So initially, after resizing the Dialog, the TextArea is rendered incorrectly.

      A work-around is to change the contents (text property) of the TextArea after resizing the Dialog, so somehow that triggers the painting. So it seems to me that without changing the text in the TextArea, all QML items are properly constructed, but a repaint event is needed for proper rendering.

      Below are screenshots of incorrect and correct (after scrolling) rendering of the Dialog.


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



            qt.team.quick.subscriptions Qt Quick and Widgets Team
            sampo.huttunen Sampo Huttunen
            1 Vote for this issue
            1 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes