I'm trying to user PyQt6 to build Desktop app. I need to build a UI presentation with three logical sections which can be resizable by horizontal axis. Looks like SplitView is a perfect component for my goal. Unfortunately I can't make it works as desired.
I found a simple example in official documentation for Qt version 5 that describes exact UI result I'm looking for.
So I decided to reuse the code under Qt version 6
import QtQuick 2.15import QtQuick.Controls 2.15import QtQuick.LayoutsApplicationWindow { height: 600 visible: true width: 1200 SplitView { anchors.fill: parent orientation: Qt.Horizontal Rectangle { Layout.maximumWidth: 400 color: "lightblue" width: 200 Text { anchors.centerIn: parent text: "View 1" } } Rectangle { id: centerItem Layout.fillWidth: true Layout.minimumWidth: 50 color: "lightgray" Text { anchors.centerIn: parent text: "View 2" } } Rectangle { color: "lightgreen" width: 200 Text { anchors.centerIn: parent text: "View 3" } } }}
But I get a different result
Looks like first two sections width are squeezed to 0
Any ideas?