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. TableView is overlapping TabBar

TableView is overlapping TabBar

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 215 Views 1 Watching
  • 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.
  • L Offline
    L Offline
    lumbo7332
    wrote on last edited by
    #1

    I have this main.qml:

    import QtQuick
    import QtQuick.Controls
    import QtQuick.Layouts
    import QtQuick.Controls.Imagine
    
    ApplicationWindow {
        visible: true
        width: Screen.width
        height: Screen.height
        title: "Portmod"
    
        TabBar {
            id: bar
            width: parent.width
            TabButton {
                text: "Manage"
                width: implicitWidth
            }
            TabButton {
                text: "Search"
                width: implicitWidth
            }
        }
    
        StackLayout {
            width: parent.width
            height: parent.height
            currentIndex: bar.currentIndex
            TableView {
                id: manageTab
                columnSpacing: 1
                rowSpacing: 1
                clip: true
    
                model: installed_pkgs_model
    
                selectionModel: ItemSelectionModel {}
    
                delegate: Rectangle {
                    implicitWidth: 300
                    implicitHeight: 50
                    color: selected ? "blue" : "lightgray"
    
                    required property bool selected
    
                    Text {
                        text: display
                    }
                } 
            }
            Item {
                id: searchTab
            }
        }
    }
    

    It's working, except the TableView is overlapping with the TabBar, and I have to drag the TableView out of the way to see it.

    Screenshot

    1 Reply Last reply
    0

    • Login

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