I have Qt 5.2 and have next problem:
On my QMainwindow i have QQuickView, which is inserted into layout like this:
QQuickView * view = new QQuickView;
container = QWidget::createWindowContainer(view, this);--
container->setFocusPolicy(Qt::TabFocus);
view->setSource(QUrl("qrc:/qml/main.qml"));
ui->layout->addWidget(container);
ui->layout – cover all mainwidow size
Then on some action i am creating other QQmlView as dialog( window ), with the same code except i don’t putting it to container. And show it :
QQuickView * dialog = new QQuickView;
dialog->setResizeMode(QQuickView::SizeRootObjectToView);
dialog->setSource(QUrl("qrc:/qml/main.qml"));
view->show();
And strange thing that and mainwindow and this dialog start display the same. Other words dialog embends into mainwindow too. How to avoid this ?
↧