I'm trying to use qml widget in QtWidget-based application like that
QQuickView *view = new QQuickView;
view->setSource(QUrl::fromLocalFile("myqml.qml"));
QWidget *widget = QWidget::createWindowContainer(view);
widget->setMinimumSize(100, 100);
widget->setMaximumSize(1000, 1000);
widget->setFocusPolicy(Qt::TabFocus);
widget->show();
And that code doesn't work right with comboBoxes, their list falls in the wrong place, it looks like Qt calculate their position relative to the screen.
If I don't use widget and do
view->show()
it works fine, but I need to use widget, to put it in QSplitter or QLayout.
Is there a way to make it work or some other way to put qml-based widget in QSplitter/QLayout.
This bug will be fixed in Qt5.1.2 (Next Patch Release) and Qt5.2.0 (Next Minor Release)
see QTBUG-32826 for more informations