PDA

View Full Version : launching external program(qt) inside another qt program



babu198649
16th January 2008, 14:44
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.

jacek
16th January 2008, 15:15
Use QProcess.

babu198649
17th January 2008, 13:47
QProcess will launch programs outside the mainprogram.

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

jacek
17th January 2008, 13:49
You can try QxxxEmbedWidget with xxx being either WS or X11 depending on the OS.

babu198649
18th January 2008, 13:50
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

jacek
18th January 2008, 21:48
You can't get the window id of a window that doesn't exist.

babu198649
19th January 2008, 05:44
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 ).

jacek
19th January 2008, 15:29
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.