[Qt-interest] system call in my Qt window
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Mon Dec 1 13:15:16 CET 2008
chandrasekar wagmare wrote on Sunday, November 30, 2008 11:22 AM:
> hi friends/experts,
> what is the way in Qt to run 'gnome system
> monitor'
QProcess - http://doc.trolltech.com/4.4/qprocess.html
> to the widget
What does that mean? Do you want to *embed* the external application?
> what is the way to do that shall i use
> plugins or or any thing else ... please help me .....
Depends on what "Run [application name] to the widget" means. ;)
If you really want to embed another application into your Qt application then things become platform-depenent I guess: on Windows you'd use the Win32 API call GetParent/SetParent, for example, taking the Windows IDs (the Qt API gives you the native window IDs: http://doc.trolltech.com/4.4/qwidget.html#effectiveWinId).
Check out how to embed Google Earth into a Qt application (the fact that Google Earth is a Qt application as well is pure chance and does not matter for this argument) on Windows:
http://groups.google.de/group/kml-support-com-api/browse_thread/thread/743601cce38d4a86
But apparently you are not talking about Windows, but about Linux/Gnome/X11, so this is probably what you're after:
http://doc.trolltech.com/4.4/qx11embedcontainer.html
I did not go into details of this Qt document, but it should work with any X11 based application which supports the "XEmbed" specification.
Note: it took me about half a sip of a coffee cup to find out about this Qt documentation: it is hence always a good idea to check out the Qt docs first before asking questions (here or on any other list)! (or at least mention that you did and that you did not find anything useful for your specific problem or that you have "tunnel vision" because of lack of coffee - oh, did I mention coffee again? Time to grab one... ;)
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list