[Solved] Two QtApp in the same window



  • 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



  • [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)
    @



  • 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



  • 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);@



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.