Results 1 to 8 of 8

Thread: Help please!

  1. #1
    Join Date
    Nov 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Default Help please!

    I created a GLWidget and I want to get its handle to use it, can any body tell me how to get its handle?!!!

  2. #2
    Join Date
    Oct 2007
    Location
    Munich, Bavaria
    Posts
    144
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1
    Thanked 19 Times in 19 Posts

    Default Re: Help please!

    What do you mean by "its handle" ?

  3. #3
    Join Date
    Nov 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Default Re: Help please!

    I want vtk to draw on this widget, so i need a handle to give it

  4. #4
    Join Date
    Oct 2007
    Location
    Munich, Bavaria
    Posts
    144
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1
    Thanked 19 Times in 19 Posts

    Default Re: Help please!

    Again: What is this handle? datatype-wise. Are you talking about the win32 window handle ....
    Some more detailed information please. Otherwiese we cannot help.

  5. #5
    Join Date
    Nov 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Default Re: Help please!

    Yes, I mean win32 handle for the GLWidget, so that i can pass it to the VTK library to draw on

  6. #6
    Join Date
    Oct 2007
    Location
    Munich, Bavaria
    Posts
    144
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1
    Thanked 19 Times in 19 Posts

    Default Re: Help please!

    Qt Code:
    1. #if defined(Q_WS_WIN)
    2. HDC getDC() const;
    3. 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.

  7. The following user says thank you to DeepDiver for this useful post:

    Mysterious (5th December 2007)

  8. #7
    Join Date
    Nov 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Default Re: Help please!

    So HDC will be the handle of the window?
    thanks for your help

  9. #8
    Join Date
    Oct 2007
    Location
    Munich, Bavaria
    Posts
    144
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1
    Thanked 19 Times in 19 Posts

    Default Re: Help please!

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.