Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Splitter not visible in Splitview within StackLayout
Forum Update on Monday, May 27th 2025

Splitter not visible in Splitview within StackLayout

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 337 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SietseAchterop
    wrote on 26 Nov 2019, 15:59 last edited by
    #1

    Hello list,

    My app is an ApplicationWindow with a StackLayout as its main content.
    One of the sub-pages is a Splitview.
    That sub-page is correct and visible, but there is NO splitter visible of usable!

    Here the simplified main.qml

    import QtQuick 2.13
    import QtQuick.Controls 2.13
    import QtQuick.Layouts 1.12
    
    ApplicationWindow {
        id: applicationWindow
        visible: true
        width: 400
        height: 400
        
        StackLayout {
            id: stackLayout
    	width: parent.width
    	currentIndex: tabBar.currentIndex
    	Pieces {
                id: iets1
    	}
    	ViewPiece {
                id: iets2
    	}
        }
    
        footer: TabBar {
            id: tabBar
            currentIndex: stackLayout.currentIndex
            TabButton {
                id: tabButton
    	    implicitHeight:20
                text: qsTr("Setup pieces")
            }
            TabButton {
                id: tabButton1
    	    implicitHeight:20
                text: qsTr("View piece")
            }
        }
    }
    
    

    And Pieces.qml

    import QtQuick 2.13
    import QtQuick.Controls 2.13
    import QtQuick.Layouts 1.12
    
    Item {
        SplitView {
            id: splitView
            anchors.fill: parent
    
    	Text {
    	    text: 'Pieces links'
    	    SplitView.preferredWidth: 200
    	}
    	Text {
    	text: 'Pieces rechts'
    	}
        }
    }
    
    

    If i change Pieces.qml into a visible ApplicationWindow and use it as the main qml-file it works!

    This is on Linux/Debian/Buster.
    What am I doing wrong? Thanks in advance.
    Regards, Sietse

    1 Reply Last reply
    0
    • I Offline
      I Offline
      IntruderExcluder
      wrote on 27 Nov 2019, 08:20 last edited by
      #2

      Your StackLayout have zero height, thats why it doesnt shows anything.

      S 1 Reply Last reply 27 Nov 2019, 18:48
      0
      • I IntruderExcluder
        27 Nov 2019, 08:20

        Your StackLayout have zero height, thats why it doesnt shows anything.

        S Offline
        S Offline
        SietseAchterop
        wrote on 27 Nov 2019, 18:48 last edited by
        #3

        @IntruderExcluder Thanks!

        1 Reply Last reply
        0

        1/3

        26 Nov 2019, 15:59

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved