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]
9
int
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
24
void
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
}
example
void example()
[5]
Definition
doc_src_groups.cpp:7
main
int main(int argc, char *argv[])
[ctor_close]
Definition
src_corelib_animation_qpropertyanimation.cpp:100
qtbase
src
widgets
doc
snippets
qsplashscreen
main.cpp
Generated on
for Qt by
1.14.0