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 <QtWidgets>
6#include <stdlib.h>
7
8//! [0]
9int main(int argc, char *argv[])
10{
11 QApplication app(argc, argv);
12 QPixmap pixmap(":/splash.png");
13 QSplashScreen splash(pixmap);
14 splash.show();
15 app.processEvents();
16 //...
17 QMainWindow window;
18 window.show();
19 splash.finish(&window);
20 return app.exec();
21}
22//! [0]
23
24void example()
25{
26 //! [2]
27 QScreen *screen = QGuiApplication::screens().at(1);
28 QPixmap pixmap(":/splash.png");
29 QSplashScreen splash(screen, pixmap);
30 splash.show();
31 //! [2]
32}
void example()
[5]
int main(int argc, char *argv[])
[ctor_close]