I've never used QML before and I don't know if the following is even possible at all.
I'm currently porting a C++ Qt Application to Qt 5.5 with existing code and lot of UI files. This application later loads a lot of C++ plugin dll at runtime. Now every plugin should have its own configuration dialog; although none of these plugins currently have a Qt dependency.
I'm currently thinking about extending the interface with something like:
class CPlugin {
public:
virtual std::string const& getQmlDescription() const;
virtual std::string const& getQmlFilePath() const;
};
So every plugin can return a set of QML data on how it wishes it's configuration dialog to look like.
When this plugin should get configured by the user, this application displays an empty QDialog and asks the plugin "give me your qml config data"; which is then rendered and executed inside the empty QDialog.
Can this QML data in terms of a string buffer or a file path to the QML data be interpreted and rendered into a empty QDialog at runtime?
Bottom line:
- Can QML be handled like this at runtime?
- Can I embed a QML
Dialogdescription inside a traditionalQDialogwindow or does these two types not mix? - Is this even remotely a good idea or should I do a hell lot differently? :)