Question

Is there a way, either at runtime or (preferably) by using preprocessor macros, to determine whether the handle returned by QWidget::winId() is a handle to a Cocoa window or a handle to a Carbon window?

Windows is obvious, but I'm more interested in Mac. A particular library I'm using already knows how to use the various handles, but it needs to know which type the handle is before using it.

Était-ce utile?

La solution

There are preprocessor defines in QtCore/qconfig.h for this.

Search for QT_MAC_USE_COCOA on the internet.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top