Re: qtimeline doesn't run
Are you sure that the problem is the timeline not running?
I.e. have you verfied that the connect line is actually valid syntax?
I am not a PythonQt user but both the (int) in the signal name and the () at the slot look wrong to me.
Btw, load into QImage, then scale, then convert into QPixmap.
QPixmap::load() needs to load into QImage and then convert to QPixmap. QPixmap::scaled() needs to convert to QImage, scale and convert back.
Two unecessary conversions.
Cheers,
_
Re: qtimeline doesn't run
Quote:
Originally Posted by
anda_skoa
I am not a PythonQt user but both the (int) in the signal name and the () at the slot look wrong to me.
_
I got the syntax from the docs here.
http://srinikom.github.io/pyside-doc...e.frameChanged
I'll double check the syntax again when I'm in the office.
Thanks again for answering the call :)
Re: qtimeline doesn't run
Quote:
Originally Posted by
Nfrancisj
That must lead to a different page for me than it does for you, I don't see any connect example there.
Cheers,
_
1 Attachment(s)
Re: qtimeline doesn't run
hmm...im not sure why it leads somewhere else...but here is a screenshot.
Attachment 11832
Re: qtimeline doesn't run
I see, still not what you have.
You have parentheses at the signal and parentheses at the slot.
The example has brackets at the signal and nothing at the slot.
Cheers,
_
Re: qtimeline doesn't run
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?
Code:
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)
Added after 14 minutes:
this works. i tried it with and without the [int]. both works.
Quote:
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!
Re: qtimeline doesn't run
Quote:
Originally Posted by
Nfrancisj
In Qt framework, do SIGNALS broadcast a specific value?
Those that have arguments do.
Quote:
Originally Posted by
Nfrancisj
for example, timeline.frameChanged, what does this signal send?
The new frame number, the value "currentFrame" changed to.
Quote:
Originally Posted by The QTimeLine Documentation
frame is the current frame number.
Cheers,
_