Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Controller() {
  2. installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes);
  3. installer.installationFinished.connect(function() {
  4. gui.clickButton(buttons.NextButton);
  5. });
  6. }
  7.  
  8. Controller.prototype.WelcomePageCallback = function() {
  9. console.log("Welcome")
  10. gui.clickButton(buttons.NextButton, 10000);
  11. }
  12.  
  13. Controller.prototype.CredentialsPageCallback = function() {
  14. gui.clickButton(buttons.NextButton);
  15. }
  16.  
  17. Controller.prototype.IntroductionPageCallback = function() {
  18. gui.clickButton(buttons.NextButton);
  19. }
  20.  
  21. Controller.prototype.TargetDirectoryPageCallback = function()
  22. {
  23. var path = installer.value("InstallerDirPath", "C:") + "\\Qt";
  24. gui.currentPageWidget().TargetDirectoryLineEdit.setText(path);
  25. gui.clickButton(buttons.NextButton);
  26. }
  27.  
  28. Controller.prototype.ComponentSelectionPageCallback = function() {
  29. function list_packages() {
  30. var components = installer.components();
  31. console.log("Available components: " + components.length);
  32. var packages = ["Packages: "];
  33. for (var i = 0 ; i < components.length ;i++) {
  34. packages.push(components[i].name);
  35. }
  36. console.log(packages.join(" "));
  37. }
  38.  
  39. list_packages();
  40.  
  41. var widget = gui.currentPageWidget();
  42.  
  43. console.log(widget);
  44.  
  45. widget.deselectAll();
  46. widget.selectComponent("qt.qt5.5125.win64_msvc2017_64");
  47.  
  48. gui.clickButton(buttons.NextButton);
  49. }
  50.  
  51. Controller.prototype.LicenseAgreementPageCallback = function() {
  52. gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
  53. gui.clickButton(buttons.NextButton);
  54. }
  55.  
  56. Controller.prototype.StartMenuDirectoryPageCallback = function() {
  57. gui.clickButton(buttons.NextButton);
  58. }
  59.  
  60. Controller.prototype.ReadyForInstallationPageCallback = function()
  61. {
  62. gui.clickButton(buttons.NextButton);
  63. }
  64.  
  65. Controller.prototype.FinishedPageCallback = function() {
  66. var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm
  67. if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) {
  68. checkBoxForm.launchQtCreatorCheckBox.checked = false;
  69. }
  70. gui.clickButton(buttons.FinishButton);
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement