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
setPositionis simply the public slot inScrollBar's C++ implementation class that is associated with theWRITEoperation on thepositionproperty. Also, I think I came to use it as a result of Qt Creator popping it up as a suggestion on aScrollBarvariable when editing the QML.A general question that this raises for me: is there ever any difference between calling
setPositionand simply assigning toposition? In case the context matters, this call/assignment happens, in my case, within aConnectionhandler 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.