0

I have a qml vertical SplitView, splited into 2 elements :

  • the top element is a green rectangle
  • the bottom element is red rectangle Both have a minium height of 200. Inside the bottom element, there is a blue rectangle anchored to the bottom with a fixed height of 50.

It looks like this 1 :

The issue is : when I resize (shrink) the window from the bottom, the bottom item does not get resized so the blue rectangle disapear under the window.

Steps to reproduce the issue :

  • move the handle a few hundred pixels to the top
  • resize the window from the bottom side to the top until the bottom item start shrinking

I get this result 2 , and as soon as I move the handle, everything goes back to a normal state and the bottom item is resized as it should be 3.

Here is the qml code :

import QtQuick.Controls 2.15
import QtQuick.Window 2.15

ApplicationWindow {
    id: root

    title: testSplitView
    visible: true
    x: 100; y: 100
    width: 1300; minimumWidth: 900;// maximumWidth: 1300
    height: 900; minimumHeight: 550;// maximumHeight: 900

    Rectangle{
        id: rectangle
        anchors.fill: parent
        color: "darkGrey"

        SplitView{
            id: verticalSplitView
            anchors.fill: parent
            orientation: Qt.Vertical

            Rectangle{
                id: topRectangle
                SplitView.fillHeight: true
                SplitView.minimumHeight: 200
                color: "red"
            }

            Rectangle{
                id: bottomRectangle
                SplitView.minimumHeight:200
                color: "green"
                Rectangle{
                    anchors.bottom: parent.bottom
                    height: 50
                    width: parent.width
                    color: "blue"
                }
            }
        }
    }
}
  • I tried your code and it seems to work fine for me. The blue rectangle never gets covered up when I resize the window. I'm on Ubuntu using Qt 5.15.5. – JarMan Nov 24 '21 at 14:23
  • Thanks for your quick reply! Are you sure you did the same steps as me? It looks like this on my screen : https://streamable.com/nxwalm . I'm also on Ubuntu 18.04 using Qt 5.15 (I also tried with Qt 5.12 using QT.Controls 1)(it behaves the same on mint 20) – Nicolas GOURDIER Nov 24 '21 at 15:34
  • I see now. It only happens if you move the splitter handle first. I missed that step. – JarMan Nov 24 '21 at 15:38

0 Answers0