Qml Canvas in SplitView: on resizing the canvas the context disappear
QML and Qt Quick
2
Posts
1
Posters
4.1k
Views
1
Watching
-
Dear friends,
i hope somebody can help me.
I use a canvas in a splitview. the canvas item has minWidth , so that i can shrink it to minimum width.But here came an error. Than i resize (use the splitview) the all painted content disappear!
my code looks like:
main.qml:
@...
SplitView{
id:spitview
anchors.fill: parent;Item{ Layout.fillWidth: true; Layout.fillHeight: true; Viewer{ anchors.fill: parent; anchors.margins: 5; } } Item{ width: parent.width/4; Layout.minimumWidth: parent.width/4; Layout.maximumWidth: parent.width/4+100; Layout.fillHeight: true; } }@
Viewer.qml:
@
Canvas{
anchors.fill:parent
onPaint: [paint some stuff]
}
@Please help me, i dont want to use a constant size for the canvas-item. Thanks.