qtqt-installer

Qt Installer Framework: How to check if component is selected for installation


Concerning the Qt Installer Framework I have this question:

How can I check in a component script if this component is currently selected for installation in the Component Selection Page?

There is no component property for that and I can not find a value that can be queried.


Solution

  • You can use the functions

    component.componentChangeRequested();
    component.installationRequested();
    component.updateRequested();
    component.uninstallationRequested();
    

    to query information about requested component changes.

    All of these functions depend on the previous state of the package. Checked packages that are uninstalled will be marked in installationRequested, unchecked packages that are installed will be marked in uninstallationRequested, and checked packages whose installed version is older than the bundled version will be marked in updateRequested.

    For further information check the component Documentation.