Solved QDialog or a QMainWindow from qml
-
Hi, is there a way to create a QDialog or a QMainWindow from qml?
-
-
Sorry but I haven't explained so good.
I have a qml application and I need to show a QWidget in a separate window. -
You can call from QML any C++ backend function that creates
QWindow
orQDialog
from widgets part, just do not forget that it requereswidgets
module and also your application should be created asQApplication
rather thanQGuiApplication
. -
@mrdebug
additionally to @IntruderExcluder 's suggestion,
KDAB has an "experimental" declarative widgets project, that might be of interest
https://www.kdab.com/declarative-widgets/ -
At the end I have rewritten the project using a normal QMainWindow object with a QQuickWidget object in it so I can use both qml and qwidgets objects