Qt Widgets in QML
-
Hi,
What do you mean by "load"?
-
[quote author="econtech" date="1398747679"]I want to display Qt widget in QML file using Qt Quick 2.0.[/quote]That is not possible, unfortunately. You can put a Qt Quick item inside a widget, but you cannot put a widget inside a Qt Quick item.
-
Hi,
I want to display Qt Widget in Qml file using Quick 2.0.
In QtQuick 1.0 there is option QDeclaraticeView is used to load the Widget.But I want to display Qt widget in QMl file using QtQuick 2.0. Also I wnat to adjust the size of the widget in Qml file.
Can you help me.
Thanks
-
Oh, I see.
In Qt Quick 2, QDeclarativeView is now called "QQuickView ":http://qt-project.org/doc/qt-5/qquickview.html
Use the QQuickView to show your QML file. Then, call QWidget::createWindowContainer() to put the QQuickView inside other widgets. (See https://blog.qt.digia.com/blog/2013/02/19/introducing-qwidgetcreatewindowcontainer/ for an example).