Qt linux online installer 3.0.2 - my unattended script broken



  • Hi.
    I have js script to install qt on headless server something like this:
    ./qt-unified-linux-x64-online.run --platform minimal --script ./qt5-unattended-install.js

    My script:

    function Controller() {
        installer.autoRejectMessageBoxes();
        installer.installationFinished.connect(function() {
            gui.clickButton(buttons.NextButton);
        })
    }
    
    Controller.prototype.WelcomePageCallback = function() {
        gui.clickButton(buttons.NextButton);
    }
    
    Controller.prototype.CredentialsPageCallback = function() {
        gui.clickButton(buttons.NextButton);
    }
    
    Controller.prototype.IntroductionPageCallback = function() {
        gui.clickButton(buttons.NextButton);
    }
    
    Controller.prototype.TargetDirectoryPageCallback = function()
    {
        gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("HomeDir") + "/Qt5");
        gui.clickButton(buttons.NextButton);
    }
    
    Controller.prototype.ComponentSelectionPageCallback = function() {
        var widget = gui.currentPageWidget();
    
        widget.deselectAll();
        widget.selectComponent("qt.56.gcc_64");
    
        gui.clickButton(buttons.NextButton);
    }
    
    Controller.prototype.LicenseAgreementPageCallback = function() {
        gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
        gui.clickButton(buttons.NextButton);
    }
    
    Controller.prototype.StartMenuDirectoryPageCallback = function() {
        gui.clickButton(buttons.NextButton);
    }
    
    Controller.prototype.ReadyForInstallationPageCallback = function()
    {
        gui.clickButton(buttons.NextButton);
    }
    
    Controller.prototype.FinishedPageCallback = function() {
    var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm
    if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) {
        checkBoxForm.launchQtCreatorCheckBox.checked = false;
    }
        gui.clickButton(buttons.FinishButton);
    }
    

    But with new online installer 3.0.2 this script doesn't work anymore. I run this script on machine with graphics and see that installer stucks on first (welcome) page. For some reason the Next button on Welcome page is disabled immediately after start and gets enabled after few seconds. I have no idea how to catch the moment when it happens and click Next button from script.
    Thoughts?



  • I encountered this problem too.

    The solution is to delay the next clicks, like this:

    gui.clickButton(buttons.NextButton, 3000);
    

    This code will click the button after 3 seconds, which should be long enough.



  • Wow! How did I miss that second argument in doc?!
    Thanks a lot!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.