Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
932 B
C++
Raw Permalink Normal View History

2013-12-18 00:45:19 +00:00
/*
SPDX-FileCopyrightText: 2002 Simon Hausmann <hausmann@kde.org>
SPDX-FileCopyrightText: 2005-2006 David Faure <faure@kde.org>
2013-12-18 00:45:19 +00:00
SPDX-License-Identifier: LGPL-2.0-or-later
2013-12-18 00:45:19 +00:00
*/
2018-10-23 01:53:22 +02:00
#include "kmainwindowtest.h"
2013-12-18 00:45:19 +00:00
#include <QApplication>
#include <QLabel>
#include <QMenuBar>
#include <QStatusBar>
2018-03-11 15:23:04 +01:00
#include <QTimer>
2013-12-18 00:45:19 +00:00
MainWindow::MainWindow()
{
2021-04-24 20:08:26 +02:00
QTimer::singleShot(2 * 1000, this, &MainWindow::showMessage);
2013-12-18 00:45:19 +00:00
setCentralWidget(new QLabel(QStringLiteral("foo"), this));
menuBar()->addAction(QStringLiteral("hi"));
}
void MainWindow::showMessage()
{
statusBar()->show();
statusBar()->showMessage(QStringLiteral("test"));
}
int main(int argc, char **argv)
{
QApplication::setApplicationName(QStringLiteral("kmainwindowtest"));
QApplication app(argc, argv);
MainWindow *mw = new MainWindow; // deletes itself when closed
mw->show();
return app.exec();
}
#include "moc_kmainwindowtest.cpp"