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. Multi-TableViews nested in a Flickable and mouse/wheel events
Forum Updated to NodeBB v4.3 + New Features

Multi-TableViews nested in a Flickable and mouse/wheel events

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 1 Posters 1.1k 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.
  • K Offline
    K Offline
    Kernelcoffee
    wrote on last edited by
    #1

    Hello all,

    In a desktop application, I have a Flickable that contains 2 TableViews setup something like this:

           Flickable {
               contentHeight: column.height
               Column {
                   id: column
                   Text {} // title
                   TableView {
                       height: row.height * rowCount
                   }
                   Text{} // title
                   TableView {
                       height: row.height * rowCount
                   }
               }
           }
    

    Now the issue is that the TableView eats all mouse event and I wish the Flickable to be scrollable using the regular mouse grab and the wheel.
    I did usedpressDelay: 100 on the Flickable which would solve the grab to flick but would prevent double-click to work. (and still doesn't fix wheel events.)
    flickableItem.interactive in tableView has no effect.

    I use the TableViews to present data listView style but with headers (with sorting later on), I don't have any cell handling/interaction except click to select row, double-click/enter to activate and arrow up/down to navigate.

    Any suggestion ?

    Thank you in advances for any help.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      Kernelcoffee
      wrote on last edited by Kernelcoffee
      #2

      So I kind of half fixed my issue:
      if add

      Binding {
              target: __mouseArea
              property: "preventStealing"
              value: false
      }
      

      in TableView I do get the flicking back but having to access a private var property feel a little hackish.

      Now the issue left is that my mouse wheel event are still not propagated to the flickable.

      N.B: forgot to specify, I'm using Qt 5.7

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kernelcoffee
        wrote on last edited by
        #3

        small update on what prevent me from getting the wheel event in the flickable when the mouse is on a tableview.
        Based on source:
        TableView is base on BasicTableView which is based on ScrollView which contains a WheelArea in a internal item that I can't access.

        in https://code.qt.io/cgit/qt/qtquickcontrols.git/tree/src/controls/ScrollView.qml it's wheelArea inside the children property and I can't find a way to deactivate it as it is in a internal Item.

        Any idee ?

        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