Results 1 to 6 of 6

Thread: How to open an external App inside QMainWindow

  1. #1
    Join Date
    Sep 2011
    Posts
    8
    Platforms
    MacOS X

    Default How to open an external App inside QMainWindow

    Hi ,

    I want to open an external app (process) inside QMainWindow

    How can I do it?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to open an external App inside QMainWindow

    How about QProcess?

  3. #3
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to open an external App inside QMainWindow

    no, he wants it in a label
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  4. #4
    Join Date
    Aug 2009
    Location
    Belgium
    Posts
    310
    Thanks
    10
    Thanked 31 Times in 25 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to open an external App inside QMainWindow

    no, he wants it in a label
    From the docs : ... QProcess allows you to treat a process as a sequential I/O device. You can write to and read from the process ... You can then write to the process's standard input by calling write(), and read the standard output by calling read(), readLine(), and getChar(). Because it inherits QIODevice, ...
    Depends if this is a console or gui app. I think Lykurg suggested this for a console app. Without more information from OP, it's hard to tell if this is an answer to his question.

    Regards,
    Marc

  5. #5
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to open an external App inside QMainWindow

    mainwindow is only available to gui app. Of course you can still read the standard/error output and send it to some text widget. But you can't open e.g. MS paint inside a widget.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  6. #6
    Join Date
    Aug 2009
    Location
    Belgium
    Posts
    310
    Thanks
    10
    Thanked 31 Times in 25 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to open an external App inside QMainWindow

    Quote Originally Posted by amleto View Post
    mainwindow is only available to gui app.
    OK, let me be more clear : "The OP didn't specify if the external app he wants to start is a console app or not." If the external app is a console app, the QProcess approach will work.

    And on Windows it IS possible to start an external app and make it appear inside another application. This requires some code in the external app though. But the OP is working on MacOS, and I don't know anything about that.

Similar Threads

  1. [SOLVED] QMainWindow open a new QMainWindow
    By xeroblast in forum Qt Programming
    Replies: 1
    Last Post: 2nd December 2010, 07:31
  2. QMainWindow inside another widget
    By DanFessler in forum Newbie
    Replies: 4
    Last Post: 23rd August 2010, 21:58
  3. Open an external file from qt
    By maider in forum Qt Programming
    Replies: 9
    Last Post: 12th March 2010, 10:09
  4. How to Open External Links?
    By merry in forum Qt Programming
    Replies: 1
    Last Post: 18th March 2008, 06:47
  5. open an external links
    By sudheer in forum Qt Tools
    Replies: 4
    Last Post: 17th January 2008, 04:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.