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 run file

QProcess run file

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 5 Posters 1.7k 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.
  • J Offline
    J Offline
    Jeronimo
    wrote on last edited by
    #1

    Hi i will have one program principal to use for me. And i want to call create two buttons and then when i press show me my other program.
    But my problem is when i do this:
    QProcess proceso;
    proceso.setWorkingDirectory(Mydir);
    proceso.start("./"+nombre1);
    proceso.start("./"+nombre2);

    Not seems to run my other program's that i want to use.
    It's because i want to include some different's version of my program of contability.

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      what is in nombre1 and nombre2?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      J 1 Reply Last reply
      2
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        It's probably not the best idea trying to manage multiple processes simultaneously with a single QProcess object.

        J 1 Reply Last reply
        3
        • ? A Former User

          It's probably not the best idea trying to manage multiple processes simultaneously with a single QProcess object.

          J Offline
          J Offline
          Jeronimo
          wrote on last edited by
          #4

          @Wieland maybe i need to search other way

          1 Reply Last reply
          0
          • VRoninV VRonin

            what is in nombre1 and nombre2?

            J Offline
            J Offline
            Jeronimo
            wrote on last edited by
            #5

            @VRonin nombre are the other version of my file.

            jsulmJ mrjjM VRoninV 3 Replies Last reply
            0
            • J Jeronimo

              @VRonin nombre are the other version of my file.

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

              @Jeronimo Just use one QProcess instance for each program you want to start, not one QProcess for all programs.

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

              1 Reply Last reply
              1
              • J Jeronimo

                @VRonin nombre are the other version of my file.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Jeronimo
                You really should hook up
                http://doc.qt.io/qt-5/qprocess.html#errorOccurred
                so you can output any errors. Else you are just flying blind.

                1 Reply Last reply
                1
                • J Jeronimo

                  @VRonin nombre are the other version of my file.

                  VRoninV Offline
                  VRoninV Offline
                  VRonin
                  wrote on last edited by
                  #8

                  @Jeronimo said in QProcess run file:

                  version of my file

                  if you are trying to open a file rather than starting a process then use QDesktopServices::openUrl

                  "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                  ~Napoleon Bonaparte

                  On a crusade to banish setIndexWidget() from the holy land of Qt

                  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