Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

QQuickView vs QDeclarativeView

$
0
0
Hi, I’m developing a modular desktop environment with a QML frontend and C++ backend, intended for use on Linux desktops. The desktop itself doesn’t provide much functionality, except the ability to manage plugins, which are shared libraries which contain QML files as resources. All the actual functionality will be integrated into these. The more I read Qt documentation, the more I doubt my approach is the optimal one. Currently I’m using QPluginLoader to load the plugins, and a QQuickView as my QML scene. After loading the plugin, the resources inside (such as QML files) become available and my approach then requires a messy signaling back and forth to create the QML from using Qt.createComponent inside QtQuick and then connecting the signals/slots to the relevant C++ class. Ideally, after loading the plugin with QPluginLoader, I would then create a QQuickItem from the QML contained inside it, connect signals/slots to the relevant c++ class and finally insert it in the QQuickView. This is where my current approach gets messy – after loading the plugin, I send a signal to the QML frontend which creates the QML file using Qt.createComponent, after which I send a signal back to create the signal/slot connections. It’s pretty messy. So after googling for a while, it would appear that instead of a QQuickView, the QDeclarativeView class is better suited for my needs? (This class is available to me, though not present in my documentation for Qt5.1?) An additional concern for me would be memory use and general performance since using a QDeclarativeView appears to require additional modules (gui). I could use some guidance here :) Thanks for reading

Viewing all articles
Browse latest Browse all 13965

Latest Images

Trending Articles



Latest Images