Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Open the application on local disk
Forum Updated to NodeBB v4.3 + New Features

Open the application on local disk

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 208 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.
  • B Offline
    B Offline
    Blackzero
    wrote on last edited by
    #1
        QString program = "C:/Program Files (x86)/My Project/MyApp.exe";
        QStringList arguments;
        QProcess *myProcess = new QProcess(this);
        myProcess->start(program, arguments);
        myProcess->waitForStarted();
        
    

    if Windows is in a language other than English, will the folder still work, will the application still open? this is my code.

    jsulmJ 1 Reply Last reply
    0
    • B Blackzero
          QString program = "C:/Program Files (x86)/My Project/MyApp.exe";
          QStringList arguments;
          QProcess *myProcess = new QProcess(this);
          myProcess->start(program, arguments);
          myProcess->waitForStarted();
          
      

      if Windows is in a language other than English, will the folder still work, will the application still open? this is my code.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Blackzero said in Open the application on local disk:

      will the folder still work, will the application still open?

      It should, because these folders are always in English, Windows simply translates them into system language when it presents them to the user (like in Windows Explorer). You can verify that in cmd.exe (dir c:).

      But you should not hardcode such paths. Instead use https://doc.qt.io/qt-6/qstandardpaths.html to request needed paths.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3

      • Login

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