Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QtGui>
5#include <stdlib.h>
6
7#include "mainwindow.h"
8
9//! [0]
10int main(int argc, char *argv[])
11{
12 QApplication app(argc, argv);
13 QPixmap pixmap(":/splash.png");
14 QSplashScreen splash(pixmap);
15 splash.show();
16 app.processEvents();
17//! [0]
18
19 sleep(5);
20//! [1]
21 QMainWindow window;
22 window.show();
23 splash.finish(&window);
24 return app.exec();
25}
26//! [1]
27
28//! [2]
29QScreen *screen = QGuiApplication::screens().at(1);
30QPixmap pixmap(":/splash.png");
32splash.show();
33//! [2]
int main(int argc, char *argv[])
[2]
Definition buffer.cpp:77
QScreen * screen
[1]
Definition main.cpp:29
QSplashScreen * splash
QPixmap pixmap(":/splash.png")
[0]