PDA

View Full Version : Can't get Widget from WinID()



abbapatris
2nd July 2008, 17:14
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.

ktk
2nd July 2008, 23:13
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()...

abbapatris
3rd July 2008, 15:01
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.

abbapatris
9th July 2008, 18:25
I have found a function XtWindowToWidget() but it crashes.