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
qtquickwidgets-index.qdoc
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5 \page qtquickwidgets-index.html
6 \title Qt Quick Widgets
7 \brief Provides a C++ widget class for displaying a Qt Quick user interface.
8
9 The Qt Quick Widgets module is a convenience wrapper for QQuickWindow.
10 It will automatically load and display a QML scene when given the URL of
11 the main \c qml file. Alternatively, you can instantiate QML objects using
12 QQmlComponent and place them in a manually set-up QQuickWidget.
13
14 Typical usage:
15
16 \code
17 QQuickWidget *view = new QQuickWidget;
18 view->setSource(QUrl::fromLocalFile("myqmlfile.qml"));
19 view->show();
20 \endcode
21
22 QQuickWidget also manages resizing the view and the root item. By default,
23 the \l {QQuickWidget::} {resizeMode} is set to
24 \l {QQuickWidget::} {SizeViewToRootObject}, which will
25 load the component and resize it to fit the view. Alternatively,
26 you can set \l {QQuickWidget::} {resizeMode} to
27 \l {QQuickWidget::SizeViewToRootObject} {SizeViewToRootObject}, which will
28 resize the view to the root item.
29
30 \section1 Using the Module
31
32 \include {module-use.qdocinc} {using the c++ api}
33
34 \section2 Building with CMake
35
36 \include {module-use.qdocinc} {building with cmake} {QuickWidgets}
37
38 \section2 Building with qmake quickwidgets
39
40 \include {module-use.qdocinc} {building_with_qmake} {quickwidgets}
41
42 \section1 Reference
43
44 \list
45 \li \l {Qt Quick Widgets C++ Classes}
46 \endlist
47
48 \section1 Licenses and Attributions
49
50 Qt Quick Widget is available under commercial licenses from
51 \l{The Qt Company}. In addition, it is available under free software
52 licenses. Since Qt 5.4, these free software licenses are
53 \l{GNU Lesser General Public License, version 3}, or the
54 \l{GNU General Public License, version 2}. See
55 \l{Qt Licensing} for more details.
56*/