Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.0
-
None
-
63f1fb2dfeabc01f14a1766a2277ece4d338b0e6
Description
Here's a test case. Just run it, the parent is changed every 500ms and the source item suddenly becomes visible.
import QtQuick 2.0 Rectangle { id: root width: 300 height: 300 Text { id: text anchors.centerIn: parent font.pixelSize: 120 font.family: "Times" color: "green" text: "Qt" } Timer { interval: 500 running: true repeat: true onTriggered: { text.parent = (text.parent ? null : root); console.log(text.parent); } } ShaderEffect { anchors.fill: parent property variant source: ShaderEffectSource { sourceItem: text hideSource: true smooth: true } } }
A real life use case is in Qt Components ToolBar that does some reparenting magic. The problem is likely related to the TODO statement in QSGShaderEffect::setSource().
Attachments
For Gerrit Dashboard: QTBUG-21032 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
15664,1 | Fixed QML Item updates after reparenting. | master | qt/qtdeclarative | Status: MERGED | +2 | 0 |