PDA

View Full Version : How to integrate / embed Qt application in other framework like OpenGL for example?



umen
4th May 2011, 05:51
Hello all
I'm using Qt for desktop application but never needed to take portion of Qt in my case QWebkit and some widgets and use
Them from other application like opengl application .
For example simple flow .
A button in the OpenGL application opens Qt Widget ,then the user fill some details and return the focus back to the OpenGL application
How can it be done ?

tbscope
4th May 2011, 06:19
Instead of using a bare widget, create a full qt application.
Call that application from within your other program.

The Qt application can then save the settings/data to a local file.
The other program (opengl, flash, ...) can then read this local file.

umen
4th May 2011, 06:32
do you mean to create exe and then call it with some cmd command from the other application ? is this is the only way ?

tbscope
4th May 2011, 06:36
do you mean to create exe and then call it with some cmd command from the other application ?
Yes.


is this is the only way ?
No, but this will be the easiest way. If you want to use signals and slots, you need to have a Qt event loop running. The easiest way to do this is to create a simple Qt application.

umen
4th May 2011, 06:46
its no good for me , i only using signal and slots inside my Qt application not in the hosting application .
all i need it to return string.

i found (i think ) good example for what i need , but the source code is missing mybe someone know where i can find the source code ?
http://labs.qt.nokia.com/2008/12/02/widgets-enter-the-third-dimension-wolfenqt/

tbscope
4th May 2011, 07:23
That is by far not what you want.
Edit: I mean, that's not what I understood from your first post. I thought you meant a non Qt opengl program.

WolfenQt is a Qt opengl program. It is not a non Qt opengl program.
If what you want is a Qt opengl program, then please do say so. And in the future be as clear as possible.

The wolfenqt example can be found on gitorious:
http://qt.gitorious.org/qt-labs/wolfenqt

umen
4th May 2011, 07:30
sorry i was wrong , in my last post you are right , i meant from none Qt openGL application .
so this application no good for me