KFadeWidgetEffect

KDE 4.9 PyKDE API Reference

- KDE's Python API

# KFadeWidgetEffect Class Reference

`from PyKDE4.kdeui import *`

Inherits: QWidget → QObject

## Detailed Description

\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();

Note:
  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
| __init__ (self, QWidget destWidget)
| paintEvent (self, QPaintEvent a0)
| start (self, int duration=250)

## Method Documentation

__init__ | ( | self, |
|  | QWidget | destWidget
| ) |  |  |

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

Parameters:

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

paintEvent | ( | self, |
|  | QPaintEvent | a0
| ) |  |  |

Internal:

start | ( | self, |
|  | int | duration=250
| ) |  |  |

Starts the animation.

Call this function after all visual changes are done.

Parameters:

  | duration | The duration of the animation in milliseconds.