public void TestAvoidJumpAtStartWithRunning() { using (var anim = new TestableQAbstractAnimation()) { anim.SetDuration(2000); using (var anim2 = new TestableQAbstractAnimation()) { anim2.SetDuration(1000); using (var anim3 = new TestableQAbstractAnimation()) { anim3.SetDuration(1000); anim.Start(); System.Threading.Thread.Sleep(300); anim2.Start(); System.Threading.Thread.Sleep(300); anim3.Start(); QCoreApplication.ProcessEvents(); Assert.Less(anim2.CurrentTime, 50); Assert.Less(anim3.CurrentTime, 50); } } } }
public void GlobalCleanup() { _qObject.Dispose(); QCoreApplication.ProcessEvents(QEventLoop.ProcessEventsFlag.AllEvents); _qmlApplicationEngine.Dispose(); _guiApplication.Dispose(); }
public void TestAvoidJumpAtStart() { var anim = new TestableQAbstractAnimation(); anim.SetDuration(1000); anim.Start(); System.Threading.Thread.Sleep(300); QCoreApplication.ProcessEvents(); Assert.Less(anim.CurrentTime, 50); }