diff options
author | Elvis Angelaccio <elvis.angelaccio@kde.org> | 2017-05-26 12:51:33 +0200 |
---|---|---|
committer | Elvis Angelaccio <elvis.angelaccio@kde.org> | 2017-06-04 12:30:08 +0000 |
commit | 04eba7b538072e2811f074bf66fd41f27c90b35c (patch) | |
tree | 4e2c8e01560cb2f8b1aec34ebd2497a508b474bc /src/widgets/doc/src | |
parent | 4480f47f7b0f81483b0cf3c8327eff12938ca018 (diff) |
QStyle: deprecate SH_Widget_Animate in favor of SH_Widget_Animation_Duration
This change introduces a new SH_Widget_Animation_Duration style hint
that applications can query instead of manually hardcoding the duration
of an animation.
As default value we use 200, which is the value that was already used in
QWidgetAnimator. A value equal to 0 means that the animations will be
disabled. This also implies that the SH_Widget_Animate style hint is
superseded and can be deprecated.
The new style hint is configurable with style sheets.
[ChangeLog][QtWidgets][Styles] Added SH_Widget_Animation_Duration style
hint which deprecates SH_Widget_Animate.
Change-Id: Ic3f5e4f7145a89697f28666aeaecabb1f3c5c96f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/doc/src')
-rw-r--r-- | src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc index 0131ae18e5..be6a068d65 100644 --- a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc @@ -2439,6 +2439,22 @@ \li Whether tool tips are shown on window title bar buttons. \row + \li \b{\c widget-animation-duration*} \target widget-animation-duration + \li \l{#Number}{Number} + \li How much an animation should last (in milliseconds). + A value equal to zero means that the animations will be disabled. + + If this property is not specified, it defaults to the + value specified by the current style for the + \l{QStyle::}{SH_Widget_Animation_Duration} style hint. + + \b{This property was added in Qt 5.10.} + + Example: + + \snippet code/doc_src_stylesheet.qdoc 162 + + \row \li \b{\c text-align} \target text-align-prop \li \l{#Alignment}{Alignment} \li The alignment of text and icon within the contents of the widget. |