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.

Was it helpful?

Solution

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

Search for QT_MAC_USE_COCOA on the internet.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top