summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qfusionstyle.cpp
diff options
context:
space:
mode:
authorKevin Ottens <ervin@kde.org>2013-02-27 17:11:41 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-13 15:00:52 +0100
commit03e2ea2ac057b2b4aa1dc4e5b817ffd552080ce5 (patch)
treecf306fa7a16caaaff9f0b04234ee6667fe723f11 /src/widgets/styles/qfusionstyle.cpp
parentbad1918cb438874e31dee05536e300c3470c7b23 (diff)
Add convenience for section actions in QMenu
Those actions are just separators having also text and potentially icon. It is very convenient to create titled sections in a menu, or give a title to a context menu. Obviously requires support for them on the style side, but modern styles like fusion or oxygen handle them just fine. For legacy styles it properly falls back to a regular separator aspect. That's why a specific style hint is also introduced. It is used by QMenu to know how the sections will be treated and take care of them correctly when eliminating duplicated separators or separators at the beginning of the menu. Change-Id: Iad00a93422b7983dc90dfc4b4b1c360122e47610 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/widgets/styles/qfusionstyle.cpp')
-rw-r--r--src/widgets/styles/qfusionstyle.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index defdf30b6b..ee237ac71a 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -3473,6 +3473,7 @@ int QFusionStyle::styleHint(StyleHint hint, const QStyleOption *option, const QW
case SH_ItemView_ChangeHighlightOnFocus:
case SH_MenuBar_MouseTracking:
case SH_Menu_MouseTracking:
+ case SH_Menu_SupportsSections:
return 1;
case SH_ToolBox_SelectedPageTitleBold: