I have a problem with QTQuick1.1 (QT4.8). I have a main class where i instance QMLApplicationViewer and it shows the window. I also call a class that should show another one with another QML File but it is not show. However the Debug Messages are displayed. Here is my code:
AnotherWindow::AnotherWindow(QString notImportant)
{
}
void AnotherWindow::create(){
QmlApplicationViewer view;
qDebug()<<"dbug: CWCReate";
view.addImportPath(QLatin1String("modules"));
view.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
view.setMainQmlFile(QString("instanceOfAnotherWindow.qml"));
view.showExpanded();
qDebug()<<"dbug: show";
}
And in Main
QmlApplicationViewer view;
view.addImportPath(QLatin1String("modules"));
view.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
view.setMainQmlFile(QLatin1String("/main.qml"));
view.setFixedSize(360,600);
AnotherWindow *c = new AnotherWindow("notImportantHere");
c->create();
view.showExpanded();
return app->exec();
}
Thanks in advance.