# class KFadeWidgetEffect

###

Module | kdeui
Namespace |
Class | KFadeWidgetEffect
Inherits | QWidget

\class KFadeWidgetEffect kfadewidgeteffect.h KFadeWidgetEffect Animates changes fading the new UI over the old look.

This widget will put itself above the widget that will change and show a fading transition from the old to the new UI. It will delete itself after the animation is finished. Example:

    KFadeWidgetEffect *animation = new KFadeWidgetEffect(widgetThatWillChange);
    // do changes on widgetThatWillChange
    // ...
    animation->start();

The widget that changes needs to have a parent widget. KFadeWidgetEffect does not work for toplevel widgets (windows).

Author Matthias Kretz <kretz@kde.org> \since 4.1

### methods

- KFadeWidgetEffect (destWidget)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  destWidget | QWidget |

  Create the animation widget. Takes a snapshot of the destWidget to use as old image that gets faded out.

  destWidget - The widget that will change and should fade to the new look.

- paintEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QPaintEvent |

  Internal

- start (duration)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  duration | int | 250

  Starts the animation.

  Call this function after all visual changes are done.

  duration - The duration of the animation in milliseconds.