Results 1 to 8 of 8

Thread: launching external program(qt) inside another qt program

  1. #1
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default launching external program(qt) inside another qt program

    hi
    how to launch a external qt program (which has seperate main) inside another qt application.

    example:
    executing the examples of qt demo in the same window instead of launching it outside the qtdemo.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: launching external program(qt) inside another qt program

    Use QProcess.

  3. #3
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default Re: launching external program(qt) inside another qt program

    QProcess will launch programs outside the mainprogram.

    i.e
    if a program contains a MainWindow then the launched program should reside inside the mainwindow

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: launching external program(qt) inside another qt program

    You can try QxxxEmbedWidget with xxx being either WS or X11 depending on the OS.

  5. The following user says thank you to jacek for this useful post:

    babu198649 (18th January 2008)

  6. #5
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default Re: launching external program(qt) inside another qt program

    thank u very much jacek
    how to find the Wid(window id ) of a program which has not yet launched (or not yet displayed on the screen). is it possible with QProcess

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: launching external program(qt) inside another qt program

    You can't get the window id of a window that doesn't exist.

  8. #7
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default Re: launching external program(qt) inside another qt program

    is it possible to embed a non qt application inside qt application by just knowing the path of the application( qt should invoke the application ).
    Last edited by babu198649; 19th January 2008 at 06:00.

  9. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: launching external program(qt) inside another qt program

    Quote Originally Posted by babu198649 View Post
    is it possible to embed a non qt application inside qt application by just knowing the path of the application( qt should invoke the application ).
    It's quite hard to do that in general case, because there's no reliable way to get the window id, but some applications (for example mplayer) have special functionality that make embedding them easier.

Similar Threads

  1. Replies: 16
    Last Post: 23rd May 2008, 10:12
  2. QT MySQL
    By sabeeshcs in forum Newbie
    Replies: 6
    Last Post: 12th January 2007, 04:19
  3. Link Errors
    By magikalpnoi in forum Qt Programming
    Replies: 5
    Last Post: 25th September 2006, 22:04

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.