Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt Installer Framework: how to specify the desktop icon
Forum Updated to NodeBB v4.3 + New Features

Qt Installer Framework: how to specify the desktop icon

Scheduled Pinned Locked Moved Solved Installation and Deployment
2 Posts 1 Posters 1.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.
  • P Offline
    P Offline
    Pt_develop
    wrote on last edited by
    #1

    I've started working with the Qt Installer Framework and find it useful except for the numerous undocumented features (e.g., setting the wizard subTitle or the existence of the DesktopDir variable) but one thing I haven't been able to figure out by code inspection is when you create a desktop shortcut how can you specify the icon?

    I can create the shortcut just fine with

    component.addOperation("CreateShortcut",td,dd);
    

    where td is the executable path and dd is the link (but note: I haven't been able to make the installer operation

     boolean performOperation(string name, stringlist arguments)
    

    work)

    however I haven't been able to figure out how to set the desktop shortcut icon.

    There must be a way because in the downloaded Qt Installer Framework installation the desktop shortcut icon isn't generic but is specified. I've tried looking at the code and in createshortcutoperation.cpp is the code

    const QString iconId = takeArgument(QString::fromLatin1("iconId="), &args);
    
    const QString iconPath = takeArgument(QString::fromLatin1("iconPath="), &args);
    
    const QString workingDir = takeArgument(QString::fromLatin1("workingDirectory="), &args);
    

    so I unsuccessfully tried

    component.addOperation("CreateShortcut",td,dd,"iconPath="+iconPath);
    

    where iconPath is the path to the icon.

    Does anyone know how Qt specifies their desktop shortcut icon?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Pt_develop
      wrote on last edited by
      #2

      Close. Just had to add the working directory and get admin rights.

      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