문제

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