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. Change TargetDirectory
Forum Updated to NodeBB v4.3 + New Features

Change TargetDirectory

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
installer frameinstaller fw
2 Posts 1 Posters 489 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.
  • V Offline
    V Offline
    Vitali
    wrote on 5 Jan 2021, 20:14 last edited by Vitali 1 Jun 2021, 07:49
    #1

    If user choose non-empty TargetDirectory, how I can change this line via adding subfolder?

    For example, user choose in TargetDirectoryPage

    TargetDirectoryLine = 'c:\Some'
    

    I want in this case make something like

    TargetDirectoryLineEdit.setText(targetDirLine + "/" + "ProductName")
    

    and follow to install app to this folder 'c:\Some\ProductName'.

    But I do not know how catch - when I can change TargetDirectory.

    IFW 3.2

    1 Reply Last reply
    0
    • V Offline
      V Offline
      Vitali
      wrote on 7 Jan 2021, 08:11 last edited by
      #2

      I did so:

      Controller.prototype.ComponentSelectionPageCallback = function()
      {
        var targetDir = gui.pageById(QInstaller.TargetDirectory).TargetDirectoryLineEdit.text;
        var files = QDesktopServices.findFiles(targetDir, "*.*");
        if (files.length!=0) {
          installer.setValue("TargetDir", targetDir + "\\" + installer.value("ProductName"));
        }
      }
      
      1 Reply Last reply
      0

      2/2

      7 Jan 2021, 08:11

      • Login

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