Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Installer 3.1.0: change package category using the scripting api
Forum Updated to NodeBB v4.3 + New Features

Qt Installer 3.1.0: change package category using the scripting api

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
6 Posts 5 Posters 851 Views 2 Watching
  • 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.
  • D Offline
    D Offline
    ds_igd
    wrote on last edited by
    #1

    The new Qt Installer based on Installer Framework 3.1.0 added new gui elements not documented in the controller scripting docs.
    How can the package catagory be changed using the scripting api? I would like to be able to change the package category from Latest Releases to Archive:
    0_1556800521847_qt_installer_3.1.0.PNG

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Goyyou
      wrote on last edited by
      #2

      This is an excellent question! I searched on the Qt Installer Framework Manual and I found nothing. Afaik, they updated the installer without adding a way to click on "Archive" and "Refresh", using a script.

      Can someone answer this question please?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        That's a question you should bring to the interest mailing list. You'll find there QtIF developers/maintainers. This forum is more user oriented.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • I Offline
          I Offline
          iieklund
          wrote on last edited by
          #4

          @Katja-Marttila can you share information about this?

          1 Reply Last reply
          0
          • K Offline
            K Offline
            Katja Marttila
            wrote on last edited by
            #5

            We have updated the documentation so from 3.1.2 onwards this will be documented too. But here is a code snippet of how to fetch from categories using controller scripts:

            Controller.prototype.ComponentSelectionPageCallback = function()
            {
                var page = gui.pageWidgetByObjectName("ComponentSelectionPage");
            
                // if GategoryGroupBox is visible, check one of the checkboxes
                // and the Fetch before selecting components
                var groupBox = gui.findChild(page, "CategoryGroupBox")
                if (groupBox) {
                    console.log("gropupbox found")
                    // findChild second argument is the displayname of the checkbox
                    var checkBox = gui.findChild(page, "Archive");
                    if (checkBox) {
                        console.log("CheckBox found")
                        console.log("Checkbox name: " + checkBox.text)
                        if (checkBox.checked == false) {
                            checkBox.click()
                            var fetchButton =  gui.findChild(page, "FetchCategoryButton")
                            if (fetchButton) {
                                console.log("fetchButton found")
                                fetchButton.click();
                            } else {
                                console.log("fetchButton NOT found")
                            }
                        }
                    } else {
                        console.log("CheckBox NOT found")
                    }
            
                } else {
                    console.log("gropupbox NOT found")
                }
            // add qt components
            }
            D 1 Reply Last reply
            4
            • K Katja Marttila

              We have updated the documentation so from 3.1.2 onwards this will be documented too. But here is a code snippet of how to fetch from categories using controller scripts:

              Controller.prototype.ComponentSelectionPageCallback = function()
              {
                  var page = gui.pageWidgetByObjectName("ComponentSelectionPage");
              
                  // if GategoryGroupBox is visible, check one of the checkboxes
                  // and the Fetch before selecting components
                  var groupBox = gui.findChild(page, "CategoryGroupBox")
                  if (groupBox) {
                      console.log("gropupbox found")
                      // findChild second argument is the displayname of the checkbox
                      var checkBox = gui.findChild(page, "Archive");
                      if (checkBox) {
                          console.log("CheckBox found")
                          console.log("Checkbox name: " + checkBox.text)
                          if (checkBox.checked == false) {
                              checkBox.click()
                              var fetchButton =  gui.findChild(page, "FetchCategoryButton")
                              if (fetchButton) {
                                  console.log("fetchButton found")
                                  fetchButton.click();
                              } else {
                                  console.log("fetchButton NOT found")
                              }
                          }
                      } else {
                          console.log("CheckBox NOT found")
                      }
              
                  } else {
                      console.log("gropupbox NOT found")
                  }
              // add qt components
              }
              D Offline
              D Offline
              ds_igd
              wrote on last edited by
              #6

              @Katja-Marttila Thank you very much! The code snippet seems to be exactly what i was looking for. And I really appreciate the effort to keep the documentation up to date.

              1 Reply Last reply
              0

              • Login

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