Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
4#ifndef QSVGWIDGET_H
5#define QSVGWIDGET_H
6
7#include <QtSvgWidgets/qtsvgwidgetsglobal.h>
8#include <QtWidgets/qwidget.h>
9
10
12
13
15class QPaintEvent;
16class QSvgRenderer;
17
18class Q_SVGWIDGETS_EXPORT QSvgWidget : public QWidget
19{
21public:
22 QSvgWidget(QWidget *parent = nullptr);
23 QSvgWidget(const QString &file, QWidget *parent = nullptr);
25
26 QSvgRenderer *renderer() const;
27
28 QSize sizeHint() const override;
29
30 QtSvg::Options options() const;
31 void setOptions(QtSvg::Options options);
32public Q_SLOTS:
33 void load(const QString &file);
34 void load(const QByteArray &contents);
35protected:
36 void paintEvent(QPaintEvent *event) override;
37
38private:
39 Q_DISABLE_COPY(QSvgWidget)
40 Q_DECLARE_PRIVATE(QSvgWidget)
41};
42
44
45#endif // QSVGWIDGET_H
\inmodule QtCore
Definition qbytearray.h:57
The QPaintEvent class contains event parameters for paint events.
Definition qevent.h:486
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtSvg
\inmodule QtSvgWidgets
Definition qsvgwidget.h:19
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
p1 load("image.bmp")
Combined button and popup list for selecting options.
struct _cl_event * event
#define Q_OBJECT
#define Q_SLOTS
QFile file
[0]
QSvgRenderer * renderer
[0]