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. Qml TableView scrollbar
Forum Update on Monday, May 27th 2025

Qml TableView scrollbar

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 188 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 16 Feb 2021, 11:51 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

    1/1

    16 Feb 2021, 11:51

    • Login

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