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. QProcess - Batch Files
Qt 6.11 is out! See what's new in the release blog

QProcess - Batch Files

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 3.6k 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.
  • T Offline
    T Offline
    teak421
    wrote on last edited by teak421
    #1

    Hi... First time poster... been at this for about a week and its a ton of fun. Anyway, I'm stuck on QProcess... I can't seem to get my external batch file to run. Been reviewing the documentation (which is excellent), but I'm still stuck. Any help would be appreciated. Tried execute, start, etc. Also, I've verified the path with a qmessagebox, its correct.

    Thanks!

    teak

    void UE4Build::on_Build_clicked() {

    QProcess process;
    process.setWorkingDirectory(UE4Paths.RUNUAT_PATH);
    process.start("RunUAT.bat");
    process.waitForFinished();
    

    }

    A little bit of nonsense now and then is cherished by the wisest men...
    Willy Wonka

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      .bat files are not executables. You need a command line interpreter tu run it i.e. instead of starting RunUAT.bat you would start cmd.exe with /c RunUAT.bat parameters.

      1 Reply Last reply
      3
      • T Offline
        T Offline
        teak421
        wrote on last edited by
        #3

        Oh my goodness... Apologies... I should have caught that. Thanks!

        teak

        A little bit of nonsense now and then is cherished by the wisest men...
        Willy Wonka

        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