Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Installer Framework: How to allow only Updates?
QtWS25 Last Chance

Qt Installer Framework: How to allow only Updates?

Scheduled Pinned Locked Moved General and Desktop
qt installer frqtifwqtinstallerframifwinstaller frameinstaller
2 Posts 1 Posters 2.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    j1elo
    wrote on 5 May 2015, 11:30 last edited by j1elo 5 Jun 2015, 14:33
    #1

    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 installer.removeWizardPageItem(component, "UninstallerRadioButton")
    and gui.pageById(QInstaller.Introduction).UninstallerRadioButton.hide()
    with no success :-(

    Is there any way to remove those radio buttons by using scripting?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      j1elo
      wrote on 7 May 2015, 14:53 last edited by j1elo 5 Jul 2015, 14:56
      #2

      Solution:

      Controller.prototype.IntroductionPageCallback = function()
      {
          // Installer is "updater" when it is run with "--updater"
          // or Controller does "installer.setUpdater()"
          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;
          }
      }
      
      1 Reply Last reply
      0

      1/2

      5 May 2015, 11:30

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved