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
qsplashscreen.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QSPLASHSCREEN_H
6#define QSPLASHSCREEN_H
7
8#include <QtWidgets/qtwidgetsglobal.h>
9#include <QtGui/qpixmap.h>
10#include <QtWidgets/qwidget.h>
11
13
14QT_BEGIN_NAMESPACE
15
16class QSplashScreenPrivate;
17
18class Q_WIDGETS_EXPORT QSplashScreen : public QWidget
19{
20 Q_OBJECT
21public:
22 explicit QSplashScreen(const QPixmap &pixmap = QPixmap(), Qt::WindowFlags f = Qt::WindowFlags());
23 QSplashScreen(QScreen *screen, const QPixmap &pixmap = QPixmap(), Qt::WindowFlags f = Qt::WindowFlags());
24 virtual ~QSplashScreen();
25
26 void setPixmap(const QPixmap &pixmap);
27 const QPixmap pixmap() const;
28 void finish(QWidget *w);
29 void repaint();
30 QString message() const;
31
32public Q_SLOTS:
33 void showMessage(const QString &message, int alignment = Qt::AlignLeft,
34 const QColor &color = Qt::black);
35 void clearMessage();
36
37Q_SIGNALS:
38 void messageChanged(const QString &message);
39
40protected:
41 bool event(QEvent *e) override;
42 virtual void drawContents(QPainter *painter);
43 void mousePressEvent(QMouseEvent *) override;
44
45private:
46 Q_DISABLE_COPY(QSplashScreen)
47 Q_DECLARE_PRIVATE(QSplashScreen)
48};
49
50QT_END_NAMESPACE
51
52#endif // QSPLASHSCREEN_H
friend class QWidget
Definition qpainter.h:431
The QSplashScreen widget provides a splash screen that can be shown during application startup.
static bool waitForWidgetMapped(QWidget *widget, int timeout=1000)
QT_REQUIRE_CONFIG(splashscreen)