Results 1 to 4 of 4

Thread: Can't get Widget from WinID()

  1. #1
    Join Date
    Jun 2007
    Posts
    52
    Thanks
    6

    Default Can't get Widget from WinID()

    Hey,

    I am trying to do some work with Windows Manager for CDE. I know this wont be portable and thats fine. What i am trying to do is get the widget from QWidget. QWidget allows me to get the ID of the underlying widget but I can't actually get a handle on it. I need a handle to it for this line of code

    XtVaSetValues(Widget, ...., NULL);

    If someone knows how to get the widget that would be a huge help.

  2. #2
    Join Date
    May 2008
    Posts
    155
    Thanked 15 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Can't get Widget from WinID()

    I think the winId() _is_ a Widget. Have you tried simply to cast it to a Widget?

    If that does not work, try the same with internalWinId() or effectiveWinId()...

  3. #3
    Join Date
    Jun 2007
    Posts
    52
    Thanks
    6

    Default Re: Can't get Widget from WinID()

    when I try any of those options I get the error invalid conversion from WId to _WidgetRec*
    or if I try to cast it to a widget
    XtVaSetValues(static_Cast<Widget>(this->winId())...);
    I get can't cast that type.

  4. #4
    Join Date
    Jun 2007
    Posts
    52
    Thanks
    6

    Default Re: Can't get Widget from WinID()

    I have found a function XtWindowToWidget() but it crashes.

Similar Threads

  1. How to Open & Close a Widget ?!!
    By Fatla in forum Qt Programming
    Replies: 6
    Last Post: 13th June 2008, 20:39
  2. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  3. Custom widget
    By zorro68 in forum Qt Programming
    Replies: 7
    Last Post: 28th January 2008, 14:06
  4. Replies: 3
    Last Post: 17th October 2007, 12:52
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.