From 63a4d6652aa8d84282083e49217120c97bb0bfc8 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Mon, 27 Apr 2009 11:36:12 +0200 Subject: Document what QWidget::winId() returns on Mac OS X. There are different types depending on Carbon and Cocoa, and it is probably helpful to point that out. Task-number: 251001 Reviewed-by: Kavindra --- src/gui/kernel/qwidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index e9fd28b..eb2e9f7 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -2132,6 +2132,10 @@ QWidget *QWidget::find(WId id) 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. + \note We recommend that you do not store this value as it is likely to change at run-time. -- cgit v0.12