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. How to scroll tableview on button click
Forum Updated to NodeBB v4.3 + New Features

How to scroll tableview on button click

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 717 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.
  • Bhushan_SureB Offline
    Bhushan_SureB Offline
    Bhushan_Sure
    wrote on last edited by
    #1

    Is there any property by which i can scroll up and down on button clicked in tableview.
    I don't want vertical scroll bar visible but i want to make it scroll on button clicks ?

    J.HilkJ 1 Reply Last reply
    0
    • Bhushan_SureB Bhushan_Sure

      Is there any property by which i can scroll up and down on button clicked in tableview.
      I don't want vertical scroll bar visible but i want to make it scroll on button clicks ?

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      Hi @Bhushan_Sure

      I'm unfamiliar with the new QML TabelView,

      But from what I understand, its based on ScrollView, therefore you should be able to set the view position by accessing contentX and contentY properties

      if it's not directly accessible try it with flickableItem.contentX


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      Bhushan_SureB 1 Reply Last reply
      1
      • J.HilkJ J.Hilk

        Hi @Bhushan_Sure

        I'm unfamiliar with the new QML TabelView,

        But from what I understand, its based on ScrollView, therefore you should be able to set the view position by accessing contentX and contentY properties

        if it's not directly accessible try it with flickableItem.contentX

        Bhushan_SureB Offline
        Bhushan_SureB Offline
        Bhushan_Sure
        wrote on last edited by
        #3

        flickableItem.contentX is useful but it was there in qtquick.controls 1. As qtquick.controls 1 is going to be depreceted, hence we have to use qtquick.controls 2
        In qtquick.controls 2 , we can directly access ContentX and ContentY as Tableview and listview is getting inherited from flickable now. We don't have to write flickableItem.contentX.

        ContentX and ContentY is solution to Flick on button in Tableview as well as ListView.

        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