Important: Please read the Qt Code of Conduct -

Qt 5.10 Click Problem with Tableview And Flickable

  • Hello,

    My environment is Window 10 & Qt 5.10

    I want my Tableview can be flickabled by touch and mouse drag.
    However, in Qt 5.10, Tableview inherits Listview not Flickable.
    Therefore, Flickable component is designed in Tableview for draging.

    But the upcoming problem is that original "click" signal of Tableview is blocked by front Flickable. And I want to get the column wherever is clicked.

    Can anyone help for me?


    Following is my code

    TableView {
        id: table
        Flickable {
            id: flick
            anchors.left: parent.left
            anchors.right: parent.right
            anchors.bottom: parent.bottom
            anchors.topMargin: headerHeight
            contentWidth: table.flickableItem.contentWidth
            contentHeight: table.flickableItem.contentHeight
            flickableDirection: Flickable.AutoFlickIfNeeded
            boundsBehavior: Flickable.StopAtBounds
            clip: true
            MouseArea {
                anchors.fill: parent
                focus: true
                propagateComposedEvents: true
                onClicked: {
        Binding {
            target: table.flickableItem
            property: "contentX"
            value: flick.contentX
        Binding {
            target: table.flickableItem
            property: "contentY"
            value: flick.contentY

Log in to reply