質問

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.

役に立ちましたか?

解決

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

Search for QT_MAC_USE_COCOA on the internet.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top