Enable QML to handle widgets. b5.1.1 patch
authorKonrad Rosenbaum <konrad@silmor.de>
Sat, 2 Nov 2013 13:16:51 +0000 (14:16 +0100)
committerKonrad Rosenbaum <konrad@silmor.de>
Thu, 28 Nov 2013 20:31:27 +0000 (21:31 +0100)
commit4ccfeb32c34371a3b5385ecd8b07f99a4abd6078
treed8f5a26174ed5f77170ee46f350f3f7b8b6b3951
parent7ec1d9797b1a9c058945fad20a6c8d3171f89555
Enable QML to handle widgets.

Added a qmlwidgethandler plugin that is dynamically loaded if QML
encounters a widget that needs to be included in a hierarchy of QML
objects. This plugin then calls QWidget::setParent to avoid a direct
dependency between QML libs and QtWidgets.

Widgets cannot have Layouts as parents, since layouts are not widgets
themselves. Instead other routines will have to take care of proper parentage.
src/plugins/plugins.pro
src/plugins/widgets/qmlwidgethandler/qmlwidgethandler.pro [new file with mode: 0644]
src/plugins/widgets/qmlwidgethandler/qqmlwidgethandler.cpp [new file with mode: 0644]
src/plugins/widgets/qmlwidgethandler/qqmlwidgethandler.h [new file with mode: 0644]
src/plugins/widgets/widgets.pro [new file with mode: 0644]
src/qml/qml/qqmlglobal.cpp
src/qml/qml/qqmlglobal_p.h
src/qml/qml/qqmlvme.cpp
src/qml/qml/qqmlwidgethandlerplugin_p.h [new file with mode: 0644]