Changeset 846 for trunk/doc/src/widgets-and-layouts/widgets.qdoc
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/doc/src/widgets-and-layouts/widgets.qdoc
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 7 7 ** This file is part of the documentation of the Qt Toolkit. 8 8 ** 9 ** $QT_BEGIN_LICENSE: LGPL$9 ** $QT_BEGIN_LICENSE:FDL$ 10 10 ** Commercial Usage 11 11 ** Licensees holding valid Qt Commercial licenses may use this file in 12 12 ** accordance with the Qt Commercial License Agreement provided with the 13 ** Software or, alternatively, in accordance with the terms contained in 14 ** awritten agreement between you and Nokia.13 ** Software or, alternatively, in accordance with the terms contained in a 14 ** written agreement between you and Nokia. 15 15 ** 16 ** GNU Lesser General Public License Usage 17 ** Alternatively, this file may be used under the terms of the GNU Lesser 18 ** General Public License version 2.1 as published by the Free Software 19 ** Foundation and appearing in the file LICENSE.LGPL included in the 20 ** packaging of this file. Please review the following information to 21 ** ensure the GNU Lesser General Public License version 2.1 requirements 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 ** 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 ** 28 ** GNU General Public License Usage 29 ** Alternatively, this file may be used under the terms of the GNU 30 ** General Public License version 3.0 as published by the Free Software 31 ** Foundation and appearing in the file LICENSE.GPL included in the 32 ** packaging of this file. Please review the following information to 33 ** ensure the GNU General Public License version 3.0 requirements will be 34 ** met: http://www.gnu.org/copyleft/gpl.html. 16 ** GNU Free Documentation License 17 ** Alternatively, this file may be used under the terms of the GNU Free 18 ** Documentation License version 1.3 as published by the Free Software 19 ** Foundation and appearing in the file included in the packaging of this 20 ** file. 35 21 ** 36 22 ** If you have questions regarding the use of this file, please contact … … 41 27 42 28 /*! 43 \page widgets-and-layouts.html 44 \title Widgets and Layouts 29 \page widgets-and-layouts.html 30 \title Widgets and Layouts 31 \ingroup qt-gui-concepts 32 \brief The primary elements for designing user interfaces in Qt. 45 33 46 \ingroup frameworks-technologies34 \section1 Widgets 47 35 48 \nextpage Widget Classes 36 Widgets are the primary elements for creating user interfaces in Qt. 37 \l{The Widget Classes}{Widgets} can display data and status information, 38 receive user input, and provide a container for other widgets that 39 should be grouped together. A widget that is not embedded in a 40 parent widget is called a \l{Window and Dialog Widgets} {window}. 49 41 50 The primary elements for designing user interfaces in Qt are widgets and layouts. 42 \image parent-child-widgets.png A parent widget containing various child widgets. 43 44 The QWidget class provides the basic capability to render to the 45 screen, and to handle user input events. All UI elements that Qt 46 provides are either subclasses of QWidget, or are used in connection 47 with a QWidget subclass. Creating custom widgets is done by 48 subclassing QWidget or a suitable subclass and reimplementing the 49 virtual event handlers. 50 51 \section1 Layouts 52 53 \l{Layout Management}{Layouts} are an elegant and flexible way to 54 automatically arrange child widgets within their container. Each 55 widget reports its size requirements to the layout through the 56 \l{QWidget::}{sizeHint} and \l{QWidget::}{sizePolicy} properties, 57 and the layout distributes the available space accordingly. 58 59 \table 60 \row 61 \o \image qgridlayout-with-5-children.png 62 \o \image qformlayout-with-6-children.png 63 \endtable 64 65 \l{Qt Designer Manual}{\QD} is a powerful tool for interactively creating and 66 arranging widgets in layouts. 67 68 \section1 Widget Styles 69 70 \l{Styles and Style Aware Widgets}{Styles} draw on behalf of 71 widgets and encapsulate the look and feel of a GUI. Qt's built-in 72 widgets use the QStyle class to perform nearly all of their drawing, 73 ensuring that they look exactly like the equivalent native widgets. 51 74 52 \section1 Widgets 75 \table 76 \row 77 \o \image windowsxp-tabwidget.png 78 \o \image plastique-tabwidget.png 79 \o \image macintosh-tabwidget.png 80 \endtable 53 81 54 \l{Widget Classes}{Widgets} can display data and status information, receive 55 user input, and provide a container for other widgets that should be grouped 56 together. A widget that is not embedded in a parent widget is called a 57 \l{Application Windows and Dialogs}{window}. 82 \l{Qt Style Sheets} are a powerful mechanism that allows you to customize the 83 appearance of widgets, in addition to what is already possible by subclassing QStyle. 58 84 59 \image parent-child-widgets.png A parent widget containing various child widgets.85 \section1 The Widget Classes 60 86 61 The QWidget class provides the basic capability to render to the screen, and to 62 handle user input events. All UI elements that Qt provides are either subclasses 63 of QWidget, or are used in connection with a QWidget subclass. Creating custom 64 widgets is done by subclassing QWidget or a suitable subclass and reimplementing 65 the virtual event handlers. 87 The following sections list the widget classes. See the \l{Qt Widget 88 Gallery} for some examples. 66 89 67 \section1 Layouts90 \section2 Basic Widgets 68 91 69 \l{Layout Management}{Layouts} are an elegant and flexible way to automatically 70 arrange child widgets within their container. Each widget reports its size requirements 71 to the layout through the \l{QWidget::}{sizeHint} and \l{QWidget::}{sizePolicy} 72 properties, and the layout distributes the available space accordingly. 92 These basic widgets (controls), e.g. buttons, comboboxes and 93 scroll bars, are designed for direct use. 73 94 74 \table 75 \row 76 \o \image qgridlayout-with-5-children.png 77 \o \image qformlayout-with-6-children.png 78 \endtable 95 \table 96 \row 97 \o \image windows-label.png 98 \o \image windowsvista-pushbutton.png 99 \o \image gtk-progressbar.png 100 \row 101 \o \image plastique-combobox.png 102 \o \image macintosh-radiobutton.png 103 \o \image cde-lineedit.png 104 \endtable 79 105 80 \l{Qt Designer Manual}{\QD} is a powerful tool for interactively creating and 81 arranging widgets in layouts. 106 \annotatedlist basicwidgets 82 107 83 \section1 Widget Styles108 \section2 Advanced Widgets 84 109 85 \l{Implementing Styles and Style Aware Widgets}{Styles} draw on behalf of widgets 86 and encapsulate the look and feel of a GUI. Qt's built-in widgets use the QStyle 87 class to perform nearly all of their drawing, ensuring that they look exactly like 88 the equivalent native widgets. 89 90 \table 91 \row 92 \o \image windowsxp-tabwidget.png 93 \o \image plastique-tabwidget.png 94 \o \image macintosh-tabwidget.png 95 \endtable 110 Advanced GUI widgets, e.g. tab widgets and progress bars, provide 111 more complex user interface controls. 96 112 97 \l{Qt Style Sheets} are a powerful mechanism that allows you to customize the 98 appearance of widgets, in addition to what is already possible by subclassing QStyle. 99 */ 113 \table 114 \row 115 \o \image windowsxp-treeview.png 116 \o \image gtk-calendarwidget.png 117 \o \image qundoview.png 118 \endtable 100 119 101 /*! 102 \page widget-classes.html 103 \title Widget Classes 120 \annotatedlist advanced 104 121 105 \contentspage Widgets and Layouts 106 \nextpage Layout Management 122 \table 123 \row 124 \o \image windowsvista-tabwidget.png 125 \o \image macintosh-groupbox.png 126 \endtable 107 127 108 Below you find a list of all widget classes in Qt. You can also browse the 109 widget classes Qt provides in the various supported styles in the 110 \l{Qt Widget Gallery}. 128 \section2 Organizer Widgets 111 129 112 \tableofcontents 130 Classes like splitters, tab bars, button groups, etc are used for 131 organizing and grouping GUI primitives into more complex 132 applications and dialogs. 113 133 114 \section1 Basic Widgets134 \annotatedlist organizers 115 135 116 These basic widgets (controls), such as buttons, comboboxes and scroll bars, are 117 designed for direct use. 136 \section2 Abstract Widget Classes 118 137 119 \table 120 \row 121 \o \image windows-label.png 122 \o \image windowsvista-pushbutton.png 123 \o \image gtk-progressbar.png 124 \row 125 \o \image plastique-combobox.png 126 \o \image macintosh-radiobutton.png 127 \o \image cde-lineedit.png 128 \endtable 138 The abstract widget classes are base classes. They are not usable as 139 standalone classes but provide functionality when they are subclassed. 129 140 130 \annotatedlist basicwidgets 131 132 \section1 Advanced Widgets 133 134 Advanced GUI widgets such as tab widgets and progress bars provide more 135 complex user interface controls. 136 137 \table 138 \row 139 \o \image windowsxp-treeview.png 140 \o \image gtk-calendarwidget.png 141 \o \image qundoview.png 142 \endtable 143 144 \annotatedlist advanced 145 146 \table 147 \row 148 \o \image windowsvista-tabwidget.png 149 \o \image macintosh-groupbox.png 150 \endtable 151 152 \section1 Organizer Widgets 153 154 Classes like splitters, tab bars, button groups, etc are used to 155 organize and group GUI primitives into more complex applications or 156 dialogs. 157 158 \annotatedlist organizers 159 160 \section1 Abstract Widget Classes 161 162 Abstract widget classes usable through subclassing. They are generally 163 not usable in themselves, but provide functionality that can be used 164 by inheriting these classes. 165 166 \annotatedlist abstractwidgets 141 \annotatedlist abstractwidgets 167 142 */ 168 143
Note:
See TracChangeset
for help on using the changeset viewer.