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);
                    }
                }
            }
        }
예제 #2
0
 public void GlobalCleanup()
 {
     _qObject.Dispose();
     QCoreApplication.ProcessEvents(QEventLoop.ProcessEventsFlag.AllEvents);
     _qmlApplicationEngine.Dispose();
     _guiApplication.Dispose();
 }
예제 #3
0
        public void TestAvoidJumpAtStart()
        {
            var anim = new TestableQAbstractAnimation();

            anim.SetDuration(1000);

            anim.Start();

            System.Threading.Thread.Sleep(300);

            QCoreApplication.ProcessEvents();
            Assert.Less(anim.CurrentTime, 50);
        }