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] Two QtApp in the same window
Forum Updated to NodeBB v4.3 + New Features

[Solved] Two QtApp in the same window

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.5k 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.
  • B Offline
    B Offline
    Beberd
    wrote on last edited by
    #1

    Hi,

    I want to launch with my main application a QtApp in the same window.
    For the moment, I have two windows...
    Does-it possible?

    Second point:
    I want to use the QProcess Class, but I have problems with relative links.
    I can't start a process with QProcess.
    I do this : @system("cd ../../myApp ./myApp ");@
    How can change directorty with QProcess?

    Thanks,
    Beberd

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dbzhang800
      wrote on last edited by
      #2

      [quote author="Beberd" date="1374222541"]Hi,

      I want to lunch with my main application a QtApp in the same window.
      For the moment, I have two windows...
      Does-it possible?
      [/quote]

      Sorry, I can't catch up with you.

      [quote author="Beberd" date="1374222541"]
      Second point:
      I want to use the QProcess Class, but I have problems with relative links.
      I can't start a process with QProcess.
      I do this : @system("cd ../../myApp ./myApp ");@
      How can change directorty with QProcess?
      [/quote]

      Hi, you don't need to change the directory in QProcess. Set proper working directory before you start you application

      @
      void QProcess::setWorkingDirectory(const QString & dir)
      @

      1 Reply Last reply
      0
      • musimbateM Offline
        musimbateM Offline
        musimbate
        wrote on last edited by
        #3

        Hi,
        You do not change directories with QProcess,you manipulate directories using "QDir":http://qt-project.org/doc/qt-4.8/qdir.html and give the processed final directory to QProcess.

        Hope this helps

        Why join the navy if you can be a pirate?-Steve Jobs

        1 Reply Last reply
        0
        • B Offline
          B Offline
          Beberd
          wrote on last edited by
          #4

          Thanks for your answers.
          It works with this solution:
          @void QProcess::setWorkingDirectory(const QString & dir)@

          I have find another solution with:
          @QDir::setCurrent(const QString &path);@

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dbzhang800
            wrote on last edited by
            #5

            Yes, once you changed the current directory of parent process, it will be inherited by child process.

            but note that, relative path used in your parent process will failed after this.

            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