Issue
how down the scroll when new data arrives? I want to go down with the new data, but the scroll is kept in the same place. how to lower scroll automatically?
I tried using:
maximumY = self.scroll.verticalScrollBar().maximum()
self.scroll.verticalScrollBar().setValue(maximumY)
but, not work
SOLVED
self.scroll.verticalScrollBar().rangeChanged.connect(self.ResizeScroll)
def ResizeScroll(self, min, maxi):
self.scroll.verticalScrollBar().setValue(maxi)
Solution
This should be a succinct way to get the behaviour desired - please check.
bar = self.scroll.verticalScrollBar()
bar.rangeChanged.connect( lambda x,y: bar.setValue(y) )
or
bar.rangeChanged.connect( lambda x,y: bar.setValue( 9999 ) )
Answered By - mdurant
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.