summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius.storm-olsen@nokia.com>2012-05-10 09:11:17 +0200
committerMarius Storm-Olsen <marius.storm-olsen@nokia.com>2012-05-10 09:11:23 +0200
commit9456528aac80c6d4c41fa96d88696dc55414b710 (patch)
treef9fdcc9cd3c7468503590bec7ed082294a0cffde /src/widgets/kernel
parent75552c8f62dcfb8012c306b37c79ec629448d780 (diff)
parentee38dec6f3aff6f7f277323c5c8488d4cd385693 (diff)
Merge branch 'docs-refactoring' into master
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qaction.cpp10
-rw-r--r--src/widgets/kernel/qactiongroup.cpp6
-rw-r--r--src/widgets/kernel/qapplication.cpp36
-rw-r--r--src/widgets/kernel/qboxlayout.cpp24
-rw-r--r--src/widgets/kernel/qformlayout.cpp6
-rw-r--r--src/widgets/kernel/qicon.cpp10
-rw-r--r--src/widgets/kernel/qlayout.cpp4
-rw-r--r--src/widgets/kernel/qlayoutitem.cpp2
-rw-r--r--src/widgets/kernel/qshortcut.cpp10
-rw-r--r--src/widgets/kernel/qstackedlayout.cpp8
-rw-r--r--src/widgets/kernel/qwhatsthis.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp30
12 files changed, 74 insertions, 74 deletions
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp
index c4f7995087..f3455d34ad 100644
--- a/src/widgets/kernel/qaction.cpp
+++ b/src/widgets/kernel/qaction.cpp
@@ -235,10 +235,10 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map)
menu and toolbar, then connected to the slot which will perform
the action. For example:
- \snippet examples/mainwindows/application/mainwindow.cpp 19
+ \snippet mainwindows/application/mainwindow.cpp 19
\codeline
- \snippet examples/mainwindows/application/mainwindow.cpp 28
- \snippet examples/mainwindows/application/mainwindow.cpp 31
+ \snippet mainwindows/application/mainwindow.cpp 28
+ \snippet mainwindows/application/mainwindow.cpp 31
We recommend that actions are created as children of the window
they are used in. In most cases actions will be children of
@@ -1037,7 +1037,7 @@ bool QAction::isChecked() const
which indicates that they are unavailable. For example, they might
be displayed using only shades of gray.
- \gui{What's This?} help on disabled actions is still available, provided
+ \uicontrol{What's This?} help on disabled actions is still available, provided
that the QAction::whatsThis property is set.
An action will be disabled when all widgets to which it is added
@@ -1328,7 +1328,7 @@ QAction::SoftKeyRole QAction::softKeyRole() const
the presence (or abscence) of the attribute.
For example:
- \snippet doc/src/snippets/code/src_gui_kernel_qaction.cpp 0
+ \snippet code/src_gui_kernel_qaction.cpp 0
\sa QAction::icon QApplication::setAttribute()
*/
diff --git a/src/widgets/kernel/qactiongroup.cpp b/src/widgets/kernel/qactiongroup.cpp
index 46ca378bbe..2cf8932859 100644
--- a/src/widgets/kernel/qactiongroup.cpp
+++ b/src/widgets/kernel/qactiongroup.cpp
@@ -109,15 +109,15 @@ void QActionGroupPrivate::_q_actionHovered()
\inmodule QtWidgets
In some situations it is useful to group QAction objects together.
- For example, if you have a \gui{Left Align} action, a \gui{Right
- Align} action, a \gui{Justify} action, and a \gui{Center} action,
+ For example, if you have a \uicontrol{Left Align} action, a \uicontrol{Right
+ Align} action, a \uicontrol{Justify} action, and a \uicontrol{Center} action,
only one of these actions should be active at any one time. One
simple way of achieving this is to group the actions together in
an action group.
Here's a example (from the \l{mainwindows/menus}{Menus} example):
- \snippet examples/mainwindows/menus/mainwindow.cpp 6
+ \snippet mainwindows/menus/mainwindow.cpp 6
Here we create a new action group. Since the action group is
exclusive by default, only one of the actions in the group is
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index e3fe157a73..60328c4cf6 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -569,7 +569,7 @@ QApplication::QApplication(int &argc, char **argv, int _internal)
\obsolete
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 0
+ \snippet code/src_gui_kernel_qapplication.cpp 0
*/
QApplication::QApplication(int &argc, char **argv, bool GUIenabled , int _internal)
@@ -1099,7 +1099,7 @@ QStyle *QApplication::style()
still the parent of the application object.
Example usage:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 1
+ \snippet code/src_gui_kernel_qapplication.cpp 1
When switching application styles, the color palette is set back to the
initial colors or the system defaults. This is necessary since certain
@@ -1291,7 +1291,7 @@ int QApplication::colorSpec()
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 2
+ \snippet code/src_gui_kernel_qapplication.cpp 2
\sa colorSpec()
*/
@@ -1315,7 +1315,7 @@ void QApplication::setColorSpec(int spec)
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 3
+ \snippet code/src_gui_kernel_qapplication.cpp 3
By default, this property contains a QSize object with zero width and height.
*/
@@ -1668,7 +1668,7 @@ void QApplication::setWindowIcon(const QIcon &icon)
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 4
+ \snippet code/src_gui_kernel_qapplication.cpp 4
\sa allWidgets(), QWidget::isWindow(), QWidget::isHidden()
*/
@@ -1693,7 +1693,7 @@ QWidgetList QApplication::topLevelWidgets()
\note Some of the widgets may be hidden.
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 5
+ \snippet code/src_gui_kernel_qapplication.cpp 5
\sa topLevelWidgets(), QWidget::isVisible()
*/
@@ -1803,10 +1803,10 @@ QFontMetrics QApplication::fontMetrics()
Closes all top-level windows.
This function is particularly useful for applications with many top-level
- windows. It could, for example, be connected to a \gui{Exit} entry in the
- \gui{File} menu:
+ windows. It could, for example, be connected to a \uicontrol{Exit} entry in the
+ \uicontrol{File} menu:
- \snippet examples/mainwindows/mdi/mainwindow.cpp 0
+ \snippet mainwindows/mdi/mainwindow.cpp 0
The windows are closed in random order, until one window does not accept
the close event. The application quits when the last window was
@@ -1843,7 +1843,7 @@ void QApplication::closeAllWindows()
Displays a simple message box about Qt. The message includes the version
number of Qt being used by the application.
- This is useful for inclusion in the \gui Help menu of an application, as
+ This is useful for inclusion in the \uicontrol Help menu of an application, as
shown in the \l{mainwindows/menus}{Menus} example.
This function is a convenience slot for QMessageBox::aboutQt().
@@ -2866,7 +2866,7 @@ void QApplication::setStartDragDistance(int l)
and the current position (e.g. in the mouse move event) is \c currentPos,
you can find out if a drag should be started with code like this:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 7
+ \snippet code/src_gui_kernel_qapplication.cpp 7
Qt uses this value internally, e.g. in QFileDialog.
@@ -3715,7 +3715,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
Here's an example of how an application's QApplication::commitData() might
be implemented:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 8
+ \snippet code/src_gui_kernel_qapplication.cpp 8
If an error occurred within the application while saving its data, you may
want to try allowsErrorInteraction() instead.
@@ -3787,7 +3787,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
If the session manager is capable of restoring sessions it will execute
\a command in order to restore the application. The command defaults to
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 9
+ \snippet code/src_gui_kernel_qapplication.cpp 9
The \c -session option is mandatory; otherwise QApplication cannot tell
whether it has been restored or what the current session identifier is.
@@ -3811,7 +3811,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
To iterate over the list, you can use the \l foreach pseudo-keyword:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 10
+ \snippet code/src_gui_kernel_qapplication.cpp 10
\sa setRestartCommand(), restartHint()
*/
@@ -3832,7 +3832,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
To iterate over the list, you can use the \l foreach pseudo-keyword:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 11
+ \snippet code/src_gui_kernel_qapplication.cpp 11
\sa setDiscardCommand(), restartCommand(), setRestartCommand()
*/
@@ -3960,7 +3960,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
Use the two-argument widgetAt() overload to get the child widget. To get
the top-level widget do this:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 12
+ \snippet code/src_gui_kernel_qapplication.cpp 12
*/
/*!
@@ -3969,7 +3969,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
Use the single-argument widgetAt() overload to get the child widget. To get
the top-level widget do this:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 13
+ \snippet code/src_gui_kernel_qapplication.cpp 13
*/
bool QApplicationPrivate::inPopupMode() const
@@ -4091,7 +4091,7 @@ bool QApplication::keypadNavigationEnabled()
flash time, then hidden for the same amount of time, but this may vary.
The default value on X11 is 1000 milliseconds. On Windows, the
- \gui{Control Panel} value is used and setting this property sets the cursor
+ \uicontrol{Control Panel} value is used and setting this property sets the cursor
flash time for all applications.
We recommend that widgets do not cache this value as it may change at any
diff --git a/src/widgets/kernel/qboxlayout.cpp b/src/widgets/kernel/qboxlayout.cpp
index 7ea77d211c..46c51d1d37 100644
--- a/src/widgets/kernel/qboxlayout.cpp
+++ b/src/widgets/kernel/qboxlayout.cpp
@@ -1239,13 +1239,13 @@ QBoxLayout::Direction QBoxLayout::direction() const
The simplest use of the class is like this:
- \snippet doc/src/snippets/layouts/layouts.cpp 0
- \snippet doc/src/snippets/layouts/layouts.cpp 1
- \snippet doc/src/snippets/layouts/layouts.cpp 2
+ \snippet layouts/layouts.cpp 0
+ \snippet layouts/layouts.cpp 1
+ \snippet layouts/layouts.cpp 2
\codeline
- \snippet doc/src/snippets/layouts/layouts.cpp 3
- \snippet doc/src/snippets/layouts/layouts.cpp 4
- \snippet doc/src/snippets/layouts/layouts.cpp 5
+ \snippet layouts/layouts.cpp 3
+ \snippet layouts/layouts.cpp 4
+ \snippet layouts/layouts.cpp 5
First, we create the widgets we want in the layout. Then, we
create the QHBoxLayout object and add the widgets into the
@@ -1302,13 +1302,13 @@ QHBoxLayout::~QHBoxLayout()
The simplest use of the class is like this:
- \snippet doc/src/snippets/layouts/layouts.cpp 6
- \snippet doc/src/snippets/layouts/layouts.cpp 7
- \snippet doc/src/snippets/layouts/layouts.cpp 8
+ \snippet layouts/layouts.cpp 6
+ \snippet layouts/layouts.cpp 7
+ \snippet layouts/layouts.cpp 8
\codeline
- \snippet doc/src/snippets/layouts/layouts.cpp 9
- \snippet doc/src/snippets/layouts/layouts.cpp 10
- \snippet doc/src/snippets/layouts/layouts.cpp 11
+ \snippet layouts/layouts.cpp 9
+ \snippet layouts/layouts.cpp 10
+ \snippet layouts/layouts.cpp 11
First, we create the widgets we want in the layout. Then, we
create the QVBoxLayout object and add the widgets into the
diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp
index 440f3f1dc2..bc4527a1e0 100644
--- a/src/widgets/kernel/qformlayout.cpp
+++ b/src/widgets/kernel/qformlayout.cpp
@@ -1038,11 +1038,11 @@ QStyle* QFormLayoutPrivate::getStyle() const
creates a QLabel behind the scenes and automatically set up
its buddy. We can then write code like this:
- \snippet doc/src/snippets/code/src_gui_kernel_qformlayout.cpp 0
+ \snippet code/src_gui_kernel_qformlayout.cpp 0
Compare this with the following code, written using QGridLayout:
- \snippet doc/src/snippets/code/src_gui_kernel_qformlayout.cpp 1
+ \snippet code/src_gui_kernel_qformlayout.cpp 1
\endlist
The table below shows the default appearance in different styles.
@@ -1083,7 +1083,7 @@ QStyle* QFormLayoutPrivate::getStyle() const
appearance of QMacStyle on all platforms, but with left-aligned
labels, you could write:
- \snippet doc/src/snippets/code/src_gui_kernel_qformlayout.cpp 2
+ \snippet code/src_gui_kernel_qformlayout.cpp 2
\sa QGridLayout, QBoxLayout, QStackedLayout
*/
diff --git a/src/widgets/kernel/qicon.cpp b/src/widgets/kernel/qicon.cpp
index 9c7f8736f0..448b6a8cfd 100644
--- a/src/widgets/kernel/qicon.cpp
+++ b/src/widgets/kernel/qicon.cpp
@@ -467,11 +467,11 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
resource, and then use it, allowing Qt to work out all the required
icon styles and sizes. For example:
- \snippet doc/src/snippets/code/src_gui_image_qicon.cpp 0
+ \snippet code/src_gui_image_qicon.cpp 0
To undo a QIcon, simply set a null icon in its place:
- \snippet doc/src/snippets/code/src_gui_image_qicon.cpp 1
+ \snippet code/src_gui_image_qicon.cpp 1
Use the QImageReader::supportedImageFormats() and
QImageWriter::supportedImageFormats() functions to retrieve a
@@ -500,7 +500,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
Provide a method to set a QIcon, and when you draw the icon, choose
whichever pixmap is appropriate for the current state of your widget.
For example:
- \snippet doc/src/snippets/code/src_gui_image_qicon.cpp 2
+ \snippet code/src_gui_image_qicon.cpp 2
You might also make use of the \c Active mode, perhaps making your
widget \c Active when the mouse is over the widget (see \l
@@ -950,12 +950,12 @@ QString QIcon::themeName()
To fetch an icon from the current icon theme:
- \snippet doc/src/snippets/code/src_gui_image_qicon.cpp 3
+ \snippet code/src_gui_image_qicon.cpp 3
Or if you want to provide a guaranteed fallback for platforms that
do not support theme icons, you can use the second argument:
- \snippet doc/src/snippets/code/src_gui_image_qicon.cpp 4
+ \snippet code/src_gui_image_qicon.cpp 4
\note By default, only X11 will support themed icons. In order to
use themed icons on Mac and Windows, you will have to bundle a
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index 8c4e988411..a7760711b6 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -1117,7 +1117,7 @@ bool QLayout::activate()
This function can be used to iterate over a layout. The following
code will draw a rectangle for each layout item in the layout structure of the widget.
- \snippet doc/src/snippets/code/src_gui_kernel_qlayout.cpp 0
+ \snippet code/src_gui_kernel_qlayout.cpp 0
\sa count(), takeAt()
*/
@@ -1134,7 +1134,7 @@ bool QLayout::activate()
The following code fragment shows a safe way to remove all items
from a layout:
- \snippet doc/src/snippets/code/src_gui_kernel_qlayout.cpp 1
+ \snippet code/src_gui_kernel_qlayout.cpp 1
\sa itemAt(), count()
*/
diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp
index 6cf3e1fe42..cf220796c5 100644
--- a/src/widgets/kernel/qlayoutitem.cpp
+++ b/src/widgets/kernel/qlayoutitem.cpp
@@ -392,7 +392,7 @@ int QLayoutItem::minimumHeightForWidth(int w) const
Reimplement this function in layout managers that support height
for width. A typical implementation will look like this:
- \snippet doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp 0
+ \snippet code/src_gui_kernel_qlayoutitem.cpp 0
Caching is strongly recommended; without it layout will take
exponential time.
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index 92f6fbafba..23487073f8 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -284,17 +284,17 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge
objects can be informed when a shortcut is executed. The shortcut
can be set up to contain all the key presses necessary to
describe a keyboard shortcut, including the states of modifier
- keys such as \gui Shift, \gui Ctrl, and \gui Alt.
+ keys such as \uicontrol Shift, \uicontrol Ctrl, and \uicontrol Alt.
\target mnemonic
On certain widgets, using '&' in front of a character will
automatically create a mnemonic (a shortcut) for that character,
- e.g. "E&xit" will create the shortcut \gui Alt+X (use '&&' to
+ e.g. "E&xit" will create the shortcut \uicontrol Alt+X (use '&&' to
display an actual ampersand). The widget might consume and perform
an action on a given shortcut. On X11 the ampersand will not be
shown and the character will be underlined. On Windows, shortcuts
- are normally not displayed until the user presses the \gui Alt
+ are normally not displayed until the user presses the \uicontrol Alt
key, but this is a setting the user can change. On Mac, shortcuts
are disabled by default. Call qt_set_sequence_auto_mnemonic() to
enable them. However, because mnemonic shortcuts do not fit in
@@ -310,7 +310,7 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge
The simplest way to create a shortcut for a particular widget is
to construct the shortcut with a key sequence. For example:
- \snippet doc/src/snippets/code/src_gui_kernel_qshortcut.cpp 0
+ \snippet code/src_gui_kernel_qshortcut.cpp 0
When the user types the \l{QKeySequence}{key sequence}
for a given shortcut, the shortcut's activated() signal is
@@ -449,7 +449,7 @@ QShortcut::~QShortcut()
This is a key sequence with an optional combination of Shift, Ctrl,
and Alt. The key sequence may be supplied in a number of ways:
- \snippet doc/src/snippets/code/src_gui_kernel_qshortcut.cpp 1
+ \snippet code/src_gui_kernel_qshortcut.cpp 1
By default, this property contains an empty key sequence.
*/
diff --git a/src/widgets/kernel/qstackedlayout.cpp b/src/widgets/kernel/qstackedlayout.cpp
index 0d2e7716e5..7db317e2bb 100644
--- a/src/widgets/kernel/qstackedlayout.cpp
+++ b/src/widgets/kernel/qstackedlayout.cpp
@@ -74,17 +74,17 @@ public:
A QStackedLayout can be populated with a number of child widgets
("pages"). For example:
- \snippet doc/src/snippets/qstackedlayout/main.cpp 0
+ \snippet qstackedlayout/main.cpp 0
\codeline
- \snippet doc/src/snippets/qstackedlayout/main.cpp 2
- \snippet doc/src/snippets/qstackedlayout/main.cpp 3
+ \snippet qstackedlayout/main.cpp 2
+ \snippet qstackedlayout/main.cpp 3
QStackedLayout provides no intrinsic means for the user to switch
page. This is typically done through a QComboBox or a QListWidget
that stores the titles of the QStackedLayout's pages. For
example:
- \snippet doc/src/snippets/qstackedlayout/main.cpp 1
+ \snippet qstackedlayout/main.cpp 1
When populating a layout, the widgets are added to an internal
list. The indexOf() function returns the index of a widget in that
diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp
index 907a29f3fb..c1a6ead381 100644
--- a/src/widgets/kernel/qwhatsthis.cpp
+++ b/src/widgets/kernel/qwhatsthis.cpp
@@ -102,7 +102,7 @@ QT_BEGIN_NAMESPACE
simple method to determine whether the text can be rendered as
plain text. See Qt::mightBeRichText() for details.
- \snippet doc/src/snippets/whatsthis/whatsthis.cpp 0
+ \snippet whatsthis/whatsthis.cpp 0
An alternative way to enter "What's This?" mode is to call
createAction(), and add the returned QAction to either a menu or
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 2a8a25e4fc..74612559f0 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -2737,12 +2737,12 @@ void QWidget::overrideWindowState(Qt::WindowStates newstate)
windows, the change is immediate. For example, to toggle between
full-screen and normal mode, use the following code:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 0
+ \snippet code/src_gui_kernel_qwidget.cpp 0
In order to restore and activate a minimized window (while
preserving its maximized and/or full-screen state), use the following:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 1
+ \snippet code/src_gui_kernel_qwidget.cpp 1
Calling this function will hide the widget. You must call show() to make
the widget visible again.
@@ -3535,7 +3535,7 @@ QSize QWidget::maximumSize() const
sizeIncrement.height() pixels vertically, with baseSize() as the
basis. Preferred widget sizes are for non-negative integers \e i
and \e j:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 2
+ \snippet code/src_gui_kernel_qwidget.cpp 2
Note that while you can set the size increment for all widgets, it
only affects windows.
@@ -3946,7 +3946,7 @@ QPoint QWidget::mapFromParent(const QPoint &pos) const
Typical usage is changing the window title:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 3
+ \snippet code/src_gui_kernel_qwidget.cpp 3
\sa isWindow()
*/
@@ -4546,7 +4546,7 @@ void QWidget::unsetLayoutDirection()
objects\endlink for a range of useful shapes.
An editor widget might use an I-beam cursor:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 6
+ \snippet code/src_gui_kernel_qwidget.cpp 6
If no cursor has been set, or after a call to unsetCursor(), the
parent's cursor is used.
@@ -4638,7 +4638,7 @@ void QWidget::unsetCursor()
using \a renderFlags to determine how to render. Rendering
starts at \a targetOffset in the \a target. For example:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 7
+ \snippet code/src_gui_kernel_qwidget.cpp 7
If \a sourceRegion is a null region, this function will use QWidget::rect() as
the region, i.e. the entire widget.
@@ -4646,7 +4646,7 @@ void QWidget::unsetCursor()
Ensure that you call QPainter::end() for the \a target device's
active painter (if any) before rendering. For example:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 8
+ \snippet code/src_gui_kernel_qwidget.cpp 8
\note To obtain the contents of an OpenGL widget, use QGLWidget::grabFrameBuffer()
or QGLWidget::renderPixmap() instead.
@@ -6267,11 +6267,11 @@ bool QWidget::isActiveWindow() const
Note that since the tab order of the \a second widget is changed, you
should order a chain like this:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 9
+ \snippet code/src_gui_kernel_qwidget.cpp 9
\e not like this:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 10
+ \snippet code/src_gui_kernel_qwidget.cpp 10
If \a first or \a second has a focus proxy, setTabOrder()
correctly substitutes the proxy.
@@ -6536,7 +6536,7 @@ void QWidget::setGeometry(const QRect &r)
To save the geometry when the window closes, you can
implement a close event like this:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 11
+ \snippet code/src_gui_kernel_qwidget.cpp 11
See the \l{Window Geometry} documentation for an overview of geometry
issues with windows.
@@ -6595,7 +6595,7 @@ QByteArray QWidget::saveGeometry() const
To restore geometry saved using QSettings, you can use code like
this:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 12
+ \snippet code/src_gui_kernel_qwidget.cpp 12
See the \l{Window Geometry} documentation for an overview of geometry
issues with windows.
@@ -6921,7 +6921,7 @@ void QWidget::setFocusPolicy(Qt::FocusPolicy policy)
widgets. Disabling updates solves this.
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 13
+ \snippet code/src_gui_kernel_qwidget.cpp 13
Disabling a widget implicitly disables all its children. Enabling a widget
enables all child widgets \e except top-level widgets or those that
@@ -8667,7 +8667,7 @@ void QWidget::leaveEvent(QEvent *)
\b{Note for the X11 platform}: It is possible to toggle global double
buffering by calling \c qt_x11_set_global_double_buffer(). For example,
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 14
+ \snippet code/src_gui_kernel_qwidget.cpp 14
\note Generally, you should refrain from calling update() or repaint()
\b{inside} a paintEvent(). For example, calling update() or repaint() on
@@ -9128,7 +9128,7 @@ QLayout *QWidget::layout() const
Example:
- \snippet examples/uitools/textfinder/textfinder.cpp 3b
+ \snippet uitools/textfinder/textfinder.cpp 3b
An alternative to calling this function is to pass this widget to
the layout's constructor.
@@ -11367,7 +11367,7 @@ void QWidget::setMask(const QRegion &newMask)
The following code shows how an image with an alpha channel can be
used to generate a mask for a widget:
- \snippet doc/src/snippets/widget-mask/main.cpp 0
+ \snippet widget-mask/main.cpp 0
The label shown by this code is masked using the image it contains,
giving the appearance that an irregularly-shaped image is being drawn