diff options
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qcommonstyle.cpp | 8 | ||||
-rw-r--r-- | src/widgets/styles/qstyle.cpp | 6 | ||||
-rw-r--r-- | src/widgets/styles/qstyle.h | 2 |
3 files changed, 16 insertions, 0 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index f19df120ba..262275611c 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -5105,6 +5105,14 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget case SH_Menu_SupportsSections: ret = false; break; +#ifndef QT_NO_TOOLTIP + case SH_ToolTip_WakeUpDelay: + ret = 700; + break; + case SH_ToolTip_FallAsleepDelay: + ret = 2000; + break; +#endif default: ret = 0; break; diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp index c6c71845eb..826a05db51 100644 --- a/src/widgets/styles/qstyle.cpp +++ b/src/widgets/styles/qstyle.cpp @@ -1894,6 +1894,12 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value SH_Menu_SupportsSections Determines if the style displays sections in menus or treat them as plain separators. Sections are separators with a text and icon hint. + \value SH_ToolTip_WakeUpDelay Determines the delay before a tooltip is shown, in milliseconds. + + \value SH_ToolTip_FallAsleepDelay Determines the delay (in milliseconds) before a new wake time is needed when + a tooltip is shown (notice: shown, not hidden). When a new wake isn't needed, a user-requested tooltip + will be shown nearly instantly. + \sa styleHint() */ diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h index 31ec2cd97a..d4e1be4787 100644 --- a/src/widgets/styles/qstyle.h +++ b/src/widgets/styles/qstyle.h @@ -698,6 +698,8 @@ public: SH_RequestSoftwareInputPanel, SH_ScrollBar_Transient, SH_Menu_SupportsSections, + SH_ToolTip_WakeUpDelay, + SH_ToolTip_FallAsleepDelay, // Add new style hint values here SH_CustomBase = 0xf0000000 |