Exemple #1
0
 protected AbstractBaseQmlTests()
 {
     _coreApplication        = new QGuiApplication(new[] { "-platform", "offscreen" });
     qmlApplicationEngine    = new QQmlApplicationEngine();
     TypeCreator             = new MockTypeCreator();
     Net.TypeCreator.Current = TypeCreator;
 }
 protected AbstractBaseQmlTests()
 {
     _coreApplication        = new QGuiApplication(new [] { "-platform", "offscreen" });
     qmlApplicationEngine    = new QQmlApplicationEngine();
     TypeCreator             = new MockTypeCreator();
     Net.TypeCreator.Current = TypeCreator;
     TypeCreator.SetInstance(typeof(TestContext), new TestContext(_coreApplication));
     if (!_testContextRegistered)
     {
         QQmlApplicationEngine.RegisterType <TestContext>("testContext");
         _testContextRegistered = true;
     }
 }