[Development] Qt Installer Framework to allow only Updates

Juan Navarro oneorjuan at gmail.com
Thu May 7 16:52:09 CEST 2015


Solution:

Controller.prototype.IntroductionPageCallback = function()
{
    if (installer.isUpdater()) {
        var widget = gui.currentPageWidget(); // Same as
gui.pageById(QInstaller.Introduction);
        widget.findChild("UpdaterRadioButton").checked = true;

        // Disable paint events on these widgets, through the
QWidget::updatesEnabled property.
        // I tried with the "visible" property, but it is not enough,
because for some reason
        // that property gets reset under some conditions. For example, if
"Next" button is pressed
        // and no updates are available.
        widget.findChild("PackageManagerRadioButton").updatesEnabled =
false;
        widget.findChild("UninstallerRadioButton").updatesEnabled = false;
    }
}

On Tue, May 5, 2015 at 2:29 PM, Juan Navarro <oneorjuan at gmail.com> wrote:

> I am attempting to create an updater tool for my already installed
> application in a locked-down system. The Maintenance tool from the Qt
> Installer Framework seems perfect, with its integration with remote
> repositories, but I would need to remove the "Add" and "Remove" components
> options, leaving only the "Update" option.
>
> I already tried in the Controller:
>     installer.removeWizardPageItem(component, "UninstallerRadioButton")
> and
>     gui.pageById(QInstaller.Introduction).UninstallerRadioButton.hide()
> with no success :-(
>
> However,
>     gui.pageById(QInstaller.Introduction).MessageLabel.hide()
> DOES work!
>
> Is there any way to remove those radio buttons by using scripting?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150507/0ab5397e/attachment.html>


More information about the Development mailing list