class KPassivePopup


Module kdeui
Namespace
Class KPassivePopup
Inherits QFrame
A dialog-like popup that displays messages without interrupting the user.

The simplest uses of KPassivePopup are by using the various message() static methods. The position the popup appears at depends on the type of the parent window:

  • Normal Windows: The popup is placed adjacent to the icon of the window.
  • System Tray Windows: The popup is placed adjact to the system tray window itself.
  • Skip Taskbar Windows: The popup is placed adjact to the window
  • itself if it is visible, and at the edge of the desktop otherwise.

    You also have the option of calling show with a QPoint as a parameter that removes the automatic placing of KPassivePopup and shows it in the point you want.

    The most basic use of KPassivePopup displays a popup containing a piece of text:

    KPassivePopup.message( "This is the message", this );
    
    We can create popups with titles and icons too, as this example shows:
    QPixmap px;
    px.load( "hi32-app-logtracker.png" );
    KPassivePopup.message( "Some title", "This is the main text", px, this );
    
    This screenshot shows a popup with both a caption and a main text which is being displayed next to the toolbar icon of the window that triggered it:

    For more control over the popup, you can use the setView(QWidget *) method to create a custom popup.

    KPassivePopup *pop = new KPassivePopup( parent );
    

    KVBox *vb = new KVBox( pop ); (void) new QLabel( vb, "Isn't this great?" );

    KHBox *box = new KHBox( vb ); (void) new QPushButton( "Yes", box ); (void) new QPushButton( "No", box );

    pop->setView( vb ); pop->show();

    Author Richard Moore, rich@kde.org Author Sascha Cunz, sascha.cunz@tiscali.de



    enums

    enum details

    methods