Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

[SOLVED]QTimeLine setPaused doesn't pause the time line correctly

$
0
0
I am using QTimeLine with Qt 4.8.4 and it seems that the implementation for setPaused() doesn’t actually pause the timeline correctly. In basic terms I have setup a QTimeLine with a duration of 5000 msecs. During the run of this timeline I can pause the timeline with a button and click the same button again to resume. On resume the time line immediately finishes! On checking the Qt source for QTimeLine it seems that on resume the QTimeLinePrivate::setCurrentTime() function is called on line 5 of this function (qtimeline.cpp line 100) it uses a value called elapsed to determine the number of loops that the timeline has performed this elapsed value contains a far larger value than expected (almost as if it hasn’t stopped logging the elapsed time on pause) this value resolves to a large loop count which automatically stops the time line on that call. This seems wrong (I would expect the time line’s elapsed value to only increment when the timeline is running) The upshot of this is that I cannot rely on pausing the timeline as it doesn’t correctly pause. Is there a workaround or a fix for this so I can continue to use QTimeLine in my application or even a suggestion of what I might be doing wrong to cause this issue

Viewing all articles
Browse latest Browse all 13965

Trending Articles