I created a GLWidget and I want to get its handle to use it, can any body tell me how to get its handle?!!!
I created a GLWidget and I want to get its handle to use it, can any body tell me how to get its handle?!!!
What do you mean by "its handle" ?
I want vtk to draw on this widget, so i need a handle to give it
Again: What is this handle? datatype-wise. Are you talking about the win32 window handle ....
Some more detailed information please. Otherwiese we cannot help.
Yes, I mean win32 handle for the GLWidget, so that i can pass it to the VTK library to draw on
Qt Code:
#if defined(Q_WS_WIN) HDC getDC() const; void releaseDC(HDC) const;To copy to clipboard, switch view to plain text mode
You can get the device context from a QWidget using the functions above.
Note on the side: You don't need a QGLWidget. QWidget will be enough if you let vtk handle the painting.
Mysterious (5th December 2007)
So HDC will be the handle of the window?
thanks for your help
This is the handle to the device context = the thing to paint on.
The handle to the window is not exposed as far as I did see.
Good luck
Bookmarks