Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Dynamically load QML components together with the C++ context.



  • Hello,

    I think about an application that will look differently for the different users. The idea is to have a TabView and the tabs, the content of the view/the page and its functionality to be related to the user and what he/she will be allowed to access. The main idea is to have an option to download and update the functionality only of one tab or few tabs.

    Example - if the user has Tab1 and Tab2 implementation in the app folder, he/she will see app with tow tabs, every tab will load a page with some functionality. If this user downloads an addon, he sould be able to open the same application that will show three tabs this time and will load the UI and the functionality for the third/new tab.

    So I am looking for a way to load the QML together with its functionality/backend written in C++. For the QML part I know one answer - it's using a Loader and I am using it. The problem is that I can't figure out how to deploy and load the C++ part. If someone here has done this before or has an idea, I will be very glad to hear some ideas?

    I am familiar with the setContextProperty approach. However, I don't have any clue how to use it for loading dynamically form a dll for example.

    Thank you in advance!


Log in to reply