Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qwebview_plugin.cpp
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
#
include
"qwebview_plugin.h"
6
7
#
include
<
QtCore
/
qplugin
.
h
>
8
#
include
<
QWebView
>
9
10
QT_BEGIN_NAMESPACE
11
12
using
namespace
Qt::StringLiterals;
13
14
static
constexpr
auto
toolTipC
=
"A widget for displaying a web page, from the Qt WebKit Widgets module."_L1
;
15
16
QWebViewPlugin::QWebViewPlugin(QObject *parent) :
17
QObject(parent),
18
m_initialized(
false
)
19
{
20
}
21
22
QString QWebViewPlugin::name()
const
23
{
24
return
u"QWebView"_s;
25
}
26
27
QString QWebViewPlugin::group()
const
28
{
29
return
u"Display Widgets"_s;
30
}
31
32
QString QWebViewPlugin::toolTip()
const
33
{
34
return
tr(toolTipC);
35
}
36
37
QString QWebViewPlugin::whatsThis()
const
38
{
39
return
tr(toolTipC);
40
}
41
42
QString QWebViewPlugin::includeFile()
const
43
{
44
return
u"<QtWebKitWidgets/QWebView>"_s;
45
}
46
47
QIcon QWebViewPlugin::icon()
const
48
{
49
return
QIcon(u":/qt-project.org/qwebview/images/qwebview.png"_s);
50
}
51
52
bool
QWebViewPlugin::isContainer()
const
53
{
54
return
false
;
55
}
56
57
QWidget *QWebViewPlugin::createWidget(QWidget *parent)
58
{
59
return
new
QWebView(parent);
60
}
61
62
bool
QWebViewPlugin::isInitialized()
const
63
{
64
return
m_initialized;
65
}
66
67
void
QWebViewPlugin::initialize(QDesignerFormEditorInterface *
/*core*/
)
68
{
69
if
(m_initialized)
70
return
;
71
72
m_initialized =
true
;
73
}
74
75
QString QWebViewPlugin::domXml()
const
76
{
77
return
QStringLiteral(R"(
78
<ui language="c++">
79
<widget class="QWebView" name="webView">
80
<property name="url">
81
<url>
82
<string>about:blank</string>
83
</url>
84
</property>
85
<property name="geometry">
86
<rect>
87
<x>0</x>
88
<y>0</y>
89
<width>300</width>
90
<height>200</height>
91
</rect>
92
</property>
93
</widget>
94
</ui>
95
)");
96
}
97
98
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
toolTipC
static constexpr auto toolTipC
Definition
qwebview_plugin.cpp:14
qttools
src
designer
src
plugins
qwebview
qwebview_plugin.cpp
Generated on
for Qt by
1.18.0