From 1a4fc0a129e330b9d80f87cb3e16ffe3b2968fab Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 4 Apr 2014 14:08:45 +0200 Subject: QStyle: Add new SH_ComboBox_UseNativePopup style hint If the style hints it, QComboBox::showPopup() will try to show a native popup instead. This is currently undocumented and an opt-in feature (typically by using a proxy style). Works only on Mac so far. Task-number: QTBUG-32731 Change-Id: I4447e884cbd6b490f3039c7a95168698c0bed16e Reviewed-by: Jens Bache-Wiig --- src/widgets/styles/qstyle.cpp | 3 +++ src/widgets/styles/qstyle.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp index d244c10316..4c5c7cd17e 100644 --- a/src/widgets/styles/qstyle.cpp +++ b/src/widgets/styles/qstyle.cpp @@ -1750,6 +1750,9 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value SH_ComboBox_Popup Allows popups as a combobox drop-down menu. + \omitvalue SH_ComboBox_UseNativePopup Whether we should use a native popup. + Only supported for non-editable combo boxes on Mac OS X so far. + \value SH_Workspace_FillSpaceOnMaximize The workspace should maximize the client area. diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h index 04112169ca..136daa9abd 100644 --- a/src/widgets/styles/qstyle.h +++ b/src/widgets/styles/qstyle.h @@ -702,6 +702,7 @@ public: SH_ToolTip_FallAsleepDelay, SH_Widget_Animate, SH_Splitter_OpaqueResize, + SH_ComboBox_UseNativePopup, // Add new style hint values here SH_CustomBase = 0xf0000000 -- cgit v1.2.3