Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. ScrollView scrolling through signals
Forum Updated to NodeBB v4.3 + New Features

ScrollView scrolling through signals

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 784 Views 1 Watching
  • 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.
  • G Offline
    G Offline
    geageagea
    wrote on last edited by
    #1

    Hi there,
    I wanted to know if it is possible to navigate through signals in a ScrollView. My app runs in a device with touch screen and some external buttons. With these buttons I can select some items on the screen (I can code which items to select). This method is used in case the touch screen fails. What I want to do is to scroll down or up in a ScrollView through the buttons (signals) or if it possible to auto scroll to the item selected that its not on screen, outside the view area.
    Thanks in advance
    Best regards

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      @geageagea ScrollView provides flickableItem property which gives access to the flickable item it holds. You can use its contentX and contentY properties to change the position.
      Something like:

      Button {
          text: "Down"
          onClicked: {
              scrollView.flickableItem.contentY += 10 // 10 = How much you want to scroll?
          }
      }
      Button {
          text: "Right"
          onClicked: {
              scrollView.flickableItem.contentX += 10
          }
      }
      

      For the opposite effect just negate the values.

      157

      1 Reply Last reply
      1
      • G Offline
        G Offline
        geageagea
        wrote on last edited by
        #3

        Hi @p3c0
        It seems that I missed that part of the documentation.
        Thanks a lot, that solved my issue
        Best regards

        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