Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qml TableView scrollbar
Qt 6.12 LTS is out! See what's new in the release blog

Qml TableView scrollbar

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 312 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.
  • C Offline
    C Offline
    CC90202
    wrote on last edited by
    #1

    Dear All,
    I've tried to install a very simple program on my windows 10 touch display device:

    import QtQuick 2.15
    import QtQuick.Window 2.0
    import QtQuick.Controls 1.4
    import QtQuick.Controls 2.4
    import QtQuick.Controls.Styles 1.4
    import QtQml.Models 2.2
    
    Window {
        width: 641
        height: 480
        visible: true
        title: qsTr("Hello World")
        Rectangle {
            width: 640
            height: 200
            anchors.fill: parent
            TableView {
                id: tv
                horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
                verticalScrollBarPolicy: Qt.ScrollBarAlwaysOn
    
                TableViewColumn {
                    role: "title"
                    title: "Title"
                    width: 100
                }
                TableViewColumn {
                    role: "author"
                    title: "Author"
                    width: 200
                }
                model: libraryModel1
    
    
                ListModel {
                    id: libraryModel1
                    ListElement {
                        title: "Title 1"
                        author: "Topo Gigio"
                    }
                    ListElement {
                        title: "Title 2"
                        author: "Paperino"
                    }
                    ListElement {
                        title: "Title 3"
                        author: "Qui Quo Qua"
                    }
                    ListElement {
                        title: "Title 1"
                        author: "Topo Gigio"
                    }
                    ListElement {
                        title: "Title 2"
                        author: "Paperino"
                    }
                    ListElement {
                        title: "Title 3"
                        author: "Qui Quo Qua"
                    }
                    ListElement {
                        title: "Title 1"
                        author: "Topo Gigio"
                    }
                    ListElement {
                        title: "Title 2"
                        author: "Paperino"
                    }
                    ListElement {
                        title: "Title 3"
                        author: "Qui Quo Qua"
                    }
                    ListElement {
                        title: "Title 1"
                        author: "Topo Gigio"
                    }
                    ListElement {
                        title: "Title 2"
                        author: "Paperino"
                    }
                    ListElement {
                        title: "Title 3"
                        author: "Qui Quo Qua"
                    }
                }
            }
        }
    }
    

    I've found a strange behaviour: the scrollbar doesn't accept touch events. It works only with the mouse.
    Does anydoby face this problem?
    What you suggest to solve it in order to get touch events on the handle ?

    Thank you
    Cristiano

    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
    • Unsolved