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
qtwidgets-index.qdoc
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5\page qtwidgets-index.html
6\title Qt Widgets
7\brief A module which provides a set of C++ technologies for building user
8interfaces
9
10 The \l {Qt Widgets C++ Classes}{Qt Widgets Module} provides a set of UI
11 elements to create classic desktop-style user interfaces. See the
12 \l {User Interfaces} overview for more information on using widgets.
13
14 \section1 Widgets
15
16 Widgets are the primary elements for creating user interfaces in Qt.
17 \l{The Widget Classes}{Widgets} can display data and status information,
18 receive user input, and provide a container for other widgets that
19 should be grouped together. A widget that is not embedded in a
20 parent widget is called a \l{Window and Dialog Widgets} {window}.
21
22 \image parent-child-widgets.png A parent widget containing various child widgets.
23
24 The QWidget class provides the basic capability to render to the
25 screen and to handle user input events. All UI elements that Qt
26 provides are either subclasses of QWidget or are used in connection
27 with a QWidget subclass. To create custom widgets, subclass QWidget or a
28 suitable subclass and reimplement the virtual event handlers.
29
30 \list
31 \li \l{Window and Dialog Widgets}
32 \li \l{Application Main Window}
33 \li \l{Dialog Windows}
34 \li \l{Keyboard Focus in Widgets}
35 \endlist
36
37 \section1 Styles
38
39 \l{Styles and Style Aware Widgets}{Styles} draw on behalf of
40 widgets and encapsulate the look and feel of a GUI. Qt's built-in
41 widgets use the QStyle class to perform nearly all of their drawing,
42 ensuring that they look exactly like the equivalent native widgets.
43
44 \table
45 \row
46 \li \image windowsvista-tabwidget.png
47 \li \image fusion-tabwidget.png
48 \li \image macos-tabwidget.png
49 \endtable
50
51 \l{Qt Style Sheets} are a powerful mechanism that lets you customize
52 the appearance of widgets, in addition to what is already possible by
53 subclassing QStyle.
54
55
56 \section1 Layouts
57
58 \l{Layout Management}{Layouts} are an elegant and flexible way to
59 automatically arrange child widgets within their container. Each
60 widget reports its size requirements to the layout through the
61 \l{QWidget::}{sizeHint} and \l{QWidget::}{sizePolicy} properties,
62 and the layout distributes the available space accordingly.
63
64 \table
65 \row
66 \li \image qgridlayout-with-5-children.png
67 \li \image qformlayout-with-6-children.png
68 \endtable
69
70 \l {Qt Widgets Designer} is a powerful tool for interactively creating and
71 arranging widgets in layouts.
72
73
74
75 \section1 Model/View Classes
76
77 The \l{Model/View Programming}{model/view} architecture provides classes
78 that manage the way data is presented to the user. Data-driven applications
79 which use lists and tables are structured to separate the data and view
80 using models, views, and delegates.
81
82 \image windows-treeview.png
83
84 \section1 Graphics View
85
86 The \l{Graphics View Framework} is for managing and interacting with a large
87 number of custom-made 2D graphical items, and a view widget for visualizing
88 the items, with support for zooming and rotation.
89
90 \image graphicsview-items.png
91
92 \section1 Using the Module
93
94 \include {module-use.qdocinc} {using the c++ api}
95
96 \section2 Building with CMake
97
98 \include {module-use.qdocinc} {building with cmake} {Widgets}
99
100 \section2 Building with qmake
101
102 \include {module-use.qdocinc} {building_with_qmake} {widgets}
103
104 \section1 Articles and Guides
105
106 \list
107 \li \l{Widgets Tutorial}
108 \li \l{Getting Started Programming with Qt Widgets}
109 \li \l{Creating a Qt Widget Based Application}
110 \li \l{Model/View Tutorial}
111 \endlist
112
113 \section1 Examples
114
115 \list
116 \li \l{Qt Widgets Examples}
117 \li \l{Layout Examples}
118 \li \l{Tools Examples}
119 \endlist
120
121 \section1 API Reference
122
123 \list
124 \li \l{Qt Widgets C++ Classes}
125 \list
126 \li \l{Basic Widget Classes}
127 \li \l{Advanced Widget Classes}
128 \li \l{Abstract Widget Classes}
129 \li \l{Organizer Widget Classes}
130 \li \l{Graphics View Classes}
131 \li \l{Model/View Classes}
132 \li \l{Main Window and Related Classes}
133 \li \l{Widget Appearance and Style Related Classes}
134 \li \l{Layout Classes}
135 \endlist
136 \li \l{Qt Style Sheets Reference}
137 \endlist
138
139 \section1 Module Evolution
140
141 \l{Changes to Qt Widgets} lists important changes in the module API
142 and functionality that were done for the Qt 6 series of Qt.
143
144 \section1 Licenses
145
146 The Qt Widgets module is available under commercial licenses from \l{The Qt Company}.
147 In addition, it is available under free software licenses:
148 The \l{GNU Lesser General Public License, version 3}, or
149 the \l{GNU General Public License, version 2}.
150 See \l{Qt Licensing} for further details.
151*/