Qt 6.x
The Qt SDK
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;
29public Q_SLOTS:
30 void load(const QString &file);
31 void load(const QByteArray &contents);
32protected:
33 void paintEvent(QPaintEvent *event) override;
34private:
35 Q_DISABLE_COPY(QSvgWidget)
36 Q_DECLARE_PRIVATE(QSvgWidget)
37};
38
40
41#endif // QSVGWIDGET_H
\inmodule QtCore
Definition qbytearray.h:57
The QPaintEvent class contains event parameters for paint events.
Definition qevent.h:485
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\inmodule QtSvg
\inmodule QtSvgWidgets
Definition qsvgwidget.h:19
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QSize sizeHint
the recommended size for the widget
Definition qwidget.h:148
virtual void paintEvent(QPaintEvent *event)
This event handler can be reimplemented in a subclass to receive paint events passed in event.
Definition qwidget.cpp:9829
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]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent