summaryrefslogtreecommitdiffstats
path: root/kdeui/tests/kmainwindowtest.cpp
blob: 6ab8d33a0db56c721dd78b57d8c05ed9e9601524 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <qtimer.h>
#include <qlabel.h>

#include <kapplication.h>
#include <kstatusbar.h>
#include <kmenubar.h>

#include "kmainwindowtest.h"

MainWindow::MainWindow()
{
    QTimer::singleShot( 2*1000, this, SLOT( showMessage() ) );

    setCentralWidget( new QLabel( "foo", this ) );

    menuBar()->insertItem( "hi" );
}

void MainWindow::showMessage()
{
    statusBar()->show();
    statusBar()->message( "test" );
}

int main( int argc, char **argv )
{
    KApplication app( argc, argv, "kmainwindowtest" );

    MainWindow* mw = new MainWindow; // deletes itself when closed
    mw->show();

    return app.exec();
}

#include "kmainwindowtest.moc"

/* vim: et sw=4 ts=4
 */