Your last code sample works, since it uses the built-in properties of ParentChange – “x” and “y”, and your solution is probably as good as it can be at the moment.
What I was concerned about is that using anchors seems much cleaner, than setting “x” and “y”, especially if I want to draw something in the middle of something else, where it becomes really kinda ugly x: parent.x + parent.width/2 – width/2. But what can we do… I will probably just avoid using re-parenting =)
ps: I’ve opened a bug report: QTBUG-30723 [bugreports.qt-project.org]
↧