ill check on your last post regarding [int], but here is how i got it to work
i have to capture the value of 'currentframe' inside a function.
it feels like a messy workaround. In Qt framework, do SIGNALS broadcast a specific value?
for example, timeline.frameChanged, what does this signal send? is it the frame that it changed to, or just a true/false signal?
The setup below is me assuming its not an actual value that the slider can read. maybe thats why the (int)was there?
so it works by running the dummyFunc when the SINAL frame changed is emitted. that function gets the current frame of timeline and sets it to the slider.
ideas why the example code (in the screenshot) doesnt work for my case?
def dummyFunc():
self.horizontalSlider.setValue(self.timeline.currentFrame())
self.timeline.setFrameRange(0,100)
self.timeline.frameChanged.connect(dummyFunc)
self.pushButton.clicked.connect(self.timeline.start)
def dummyFunc():
self.horizontalSlider.setValue(self.timeline.currentFrame())
self.timeline = QtCore.QTimeLine(5000)
self.timeline.setFrameRange(0,100)
self.timeline.frameChanged.connect(dummyFunc)
self.pushButton.clicked.connect(self.timeline.start)
To copy to clipboard, switch view to plain text mode
Added after 14 minutes:
this works. i tried it with and without the [int]. both works.
self.timeline = QtCore.QTimeLine(5000)
self.timeline.setFrameRange(0,100)
self.timeline.frameChanged.connect(self.horizontal Slider.setValue)
self.pushButton.clicked.connect(self.timeline.star t)
thanks again
cheers!
Bookmarks