ScrollBar setPosition method?
-
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 aScrollBar
-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.
-
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 aScrollBar
-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.
-
I now understand that
setPosition
is simply the public slot inScrollBar
's C++ implementation class that is associated with theWRITE
operation on theposition
property. Also, I think I came to use it as a result of Qt Creator popping it up as a suggestion on aScrollBar
variable when editing the QML.A general question that this raises for me: is there ever any difference between calling
setPosition
and simply assigning toposition
? In case the context matters, this call/assignment happens, in my case, within aConnection
handler function in a QML component. -
@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.