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
qsvgwidget.h
Go to the documentation of this file.
1// Copyright (C) 2020 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
6#ifndef QSVGWIDGET_H
7#define QSVGWIDGET_H
8
9#include <QtSvgWidgets/qtsvgwidgetsglobal.h>
10#include <QtWidgets/qwidget.h>
11
12
13QT_BEGIN_NAMESPACE
14
15
16class QSvgWidgetPrivate;
17class QPaintEvent;
18class QSvgRenderer;
19
20class Q_SVGWIDGETS_EXPORT QSvgWidget : public QWidget
21{
22 Q_OBJECT
23public:
24 QSvgWidget(QWidget *parent = nullptr);
25 QSvgWidget(const QString &file, QWidget *parent = nullptr);
26 ~QSvgWidget();
27
28 QSvgRenderer *renderer() const;
29
30 QSize sizeHint() const override;
31
32 QtSvg::Options options() const;
33 void setOptions(QtSvg::Options options);
34public Q_SLOTS:
35 void load(const QString &file);
36 void load(const QByteArray &contents);
37protected:
38 void paintEvent(QPaintEvent *event) override;
39
40private:
41 Q_DISABLE_COPY(QSvgWidget)
42 Q_DECLARE_PRIVATE(QSvgWidget)
43};
44
45QT_END_NAMESPACE
46
47#endif // QSVGWIDGET_H
bool eventFilter(QObject *obj, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
\inmodule QtSvgWidgets
Definition qsvgwidget.h:21
Combined button and popup list for selecting options.