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. [SOLVED] Trying to Run GlovePIE with parameters
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Trying to Run GlovePIE with parameters

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 4.2k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    mccurrab
    wrote on last edited by
    #1

    I am trying to open GlovePIE with a script already loaded. Via command line this can be easily accomplished by (while in the correct folder) calling "GlovePIE.exe scriptname.PIE". However, when trying to get this to run on a button press using:
    @
    void MainWindow::runGlovePIE()
    {
    QProcess::startDetached("GlovePIE.exe");
    }
    @

    This just opens the program, but any attempts I've made to open it with extra parameters (even with answers from this forum have not succeeded). Any suggestions?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mccurrab
      wrote on last edited by
      #2

      Nevermind, problem solved.

      "GlovePIE.exe scriptname.PIE" didn't work because it couldn't find the file because when runnning the debug version, the working directory was not the same as the .exe as it is when one would normally run the .exe

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        Did you try "startDetached with parameter list":https://qt-project.org/doc/qt-4.8/qprocess.html#startDetached-2 ?

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mlong
          wrote on last edited by
          #4

          Try using a parameter list.
          @
          QStringList params << "scriptname.PIE";
          QProcess::startDetatched("GlovePIE.exe",params);
          @

          Edit: Nevermind. I missed the part where you said you'd figured it out. :)

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mccurrab
            wrote on last edited by
            #5

            Thanks for the responses anyway, I do love the response time here =D. This definitely seems like a flaw with the way Qt does stuff because debug behavior does not simulate actual behavior.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mlong
              wrote on last edited by
              #6

              Glad to (try to) help! Be sure and edit your post to mark it [Solved]. Thanks!

              Software Engineer
              My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mccurrab
                wrote on last edited by
                #7

                Done, thanks for the reminder!

                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