How to embed a QWidget in Qt Quick
-
As a Qt Quick beginner, I am migrating a QWidget project to Qt Quick. Currently, I have found that the TreeView in Quick does not meet my business needs, so I would like to continue using QWidget for this part. However, I’m not sure how to embed a QWidget component in Qt Quick (maybe I missed something in the documentation, but I hope to get some guidance). thanks
-
You can integrate QtQuick inside QtWidget with QQuickWidget, however, I seriously doubt the contrary to be possible. Unless instanciating from Main.cpp one window for QtQuick and another for QtWidgets, which is not really a super idea.
Edit : as a matter of fact you actually could put your QtQuick work into a QQuickWidget (in that case the top most element from the QML should be an Item or derivate, but not a Window), but that would be the Quick work either inside or next to the Widget, while you seem to be searching for the contrary.
What's wrong with QML's TreeView ? It's normally supposed to offer the same functionalities than it's widget counter part.
-
Hi,
If you really really need that, you can check the (now archived) Declarative Widgets project.