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
4#ifndef QERRORMESSAGE_H
5#define QERRORMESSAGE_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8
9#include <QtWidgets/qdialog.h>
10
11QT_REQUIRE_CONFIG(errormessage);
12
13QT_BEGIN_NAMESPACE
14
15class QErrorMessagePrivate;
16
17class Q_WIDGETS_EXPORT QErrorMessage: public QDialog
18{
19 Q_OBJECT
20 Q_DECLARE_PRIVATE(QErrorMessage)
21public:
22 explicit QErrorMessage(QWidget* parent = nullptr);
23 ~QErrorMessage();
24
25 static QErrorMessage * qtHandler();
26
27public Q_SLOTS:
28 void showMessage(const QString &message);
29 void showMessage(const QString &message, const QString &type);
30
31protected:
32 void done(int) override;
33 void changeEvent(QEvent *e) override;
34
35private:
36 Q_DISABLE_COPY(QErrorMessage)
37};
38
39QT_END_NAMESPACE
40
41#endif // QERRORMESSAGE_H
42

source code of qtbase/src/widgets/dialogs/qerrormessage.h