ListView and scrollable TextArea refreshing problems
Unsolved
QML and Qt Quick
-
I have a problem when using a scrollable TextArea into a big ListView.
In the example below, I use a ListView with 12 items. The delegate contains a scrollable TextArea. Since the text is wide/long enough, the TextArea vertical and horizontal scroll bars are enabled in all the TextAreas.
The problem is, when I scroll the ListView, the TextArea contents start to disappear. Some of them, previously visible, also disappear. Only if I click in one of the TextAreas that has invisible text, then the text (re)appears.
It does not happen if the text for example is not wide and only the vertical scrollbar is needed.
In the screenshot below, all the TextAreas should display the same text.
import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Controls 2.15 Window { id: windowId width: 640 height: 480 visible: true ListView { anchors.fill: parent model: 12 delegate: Rectangle { width: windowId.width height: 100 border.color: "blue" Column { id: column anchors.fill: parent ScrollView { id: view width: column.width/2 height: column.height TextArea { text: "TextArea\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA..\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB..\nC..\nD..\nE..\nF..\nG..\nH..\nI..\nJ..\nK..\nL..\nM..\nN..\nO..\nP..\nQ..\nR..\nS..\nT..\nU..\nV..\nW..\nX..\nY..\n" } } } } }
I'm using Qt 5.15.2 MSVC 2019 64 bits in Windows 10.