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. ScrollBar setPosition method?
Qt 6.11 is out! See what's new in the release blog

ScrollBar setPosition method?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 749 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.
  • B Offline
    B Offline
    Bob64
    wrote on last edited by
    #1

    After an interval, I am returning to some code that I need to modify and am confused by the fact that I seem to be using a setPosition() method in a ScrollBar-based component. This does not exist according to the documentation. Has anyone heard of this, or have any idea whether it is a valid method to use? I have no idea how I came to use it.

    For what it's worth, I am using to force the scrollbar position to the end of its range when certain events occur.

    eyllanescE 1 Reply Last reply
    0
    • B Bob64

      After an interval, I am returning to some code that I need to modify and am confused by the fact that I seem to be using a setPosition() method in a ScrollBar-based component. This does not exist according to the documentation. Has anyone heard of this, or have any idea whether it is a valid method to use? I have no idea how I came to use it.

      For what it's worth, I am using to force the scrollbar position to the end of its range when certain events occur.

      eyllanescE Offline
      eyllanescE Offline
      eyllanesc
      wrote on last edited by
      #2

      @Bob64 maybe setValue

      If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

      B 1 Reply Last reply
      1
      • B Offline
        B Offline
        Bob64
        wrote on last edited by
        #3

        I now understand that setPosition is simply the public slot in ScrollBar's C++ implementation class that is associated with the WRITE operation on the position property. Also, I think I came to use it as a result of Qt Creator popping it up as a suggestion on a ScrollBar variable when editing the QML.

        A general question that this raises for me: is there ever any difference between calling setPosition and simply assigning to position? In case the context matters, this call/assignment happens, in my case, within a Connection handler function in a QML component.

        1 Reply Last reply
        0
        • eyllanescE eyllanesc

          @Bob64 maybe setValue

          B Offline
          B Offline
          Bob64
          wrote on last edited by
          #4

          @eyllanesc I'm sorry - I thought I had responded to your suggestion but I have just noticed that I didn't. I suspect I forgot to submit my reply.

          Anyway, thank you, but I think the link you posted relates to Qt Widgets whereas I am using QML.

          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