Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to check in QML if plugin is available
vishwajeet last edited by
I want to check from my QML application if the required plugin is available or not. so based on that i can have some conditional steps to do.
Does anybody know how to do that ? is it possible in QML to check ?
Thanks a lot :)
DenisKormalev last edited by
I'm not sure, but I don't think it is possible from QML. Maybe using C++ is a valid option for you?
minimoog77 last edited by
Just try to load dummy qml file who has 'import yourplugin', if it's fails then plugin is unavailable.
Never tried myself, it's a idea.
mbrasser last edited by
There isn't any official, built-in way to do this from QML in Qt Quick 1.x. It isn't especially elegant, but as minimoog77 suggested, a workaround is to use Loader or dynamic item creation to try and load a file with the needed import, and then check whether or not you've received any errors.
Hopefully we'll have a better solution for this in a future version of QML.