1

I read this advice: How do I use Qt and SDL together? and now I have question connected to it. This example was created for Linux, but how use it under Windows? winId() under Windows return WinAPI Handler for widgets, other then Linux. Is there any possibility to use SDL under Windows with Qt?

Community
  • 1
  • 1
zwierzak
  • 269
  • 1
  • 4
  • 12

1 Answers1

1

Yes.

Both of them are portable frameworks and tools. I think there is no huge problem but maybe there is some easy compilation issues.

Note: winId() returns OS-specific value such as HWND for Windows, HIView for Mac and Window for X.

Returns the window system identifier of the widget.

Portable in principle, but if you use it you are probably about to do something non-portable. Be careful.

If a widget is non-native (alien) and winId() is invoked on it, that widget will be provided a native handle.

On Mac OS X, the type returned depends on which framework Qt was linked against. If Qt is using Carbon, the {WId} is actually an HIViewRef. If Qt is using Cocoa, {WId} is a pointer to an NSView.

masoud
  • 55,379
  • 16
  • 141
  • 208