A dialog window is a top-level window mostly used for short-term
tasks and brief communications with the user. QDialogs may be
modal or modeless. QDialogs can
- provide a \link #return return
- value\endlink, and they can have \link #default default
- buttons\endlink. QDialogs can also have a QSizeGrip in their
+ provide a \l{#return}{return value}, and they can have \l{#default}{default buttons}. QDialogs can also have a QSizeGrip in their
lower-right corner, using setSizeGripEnabled().
Note that QDialog (an any other widget that has type Qt::Dialog) uses
The most common way to display a modal dialog is to call its
exec() function. When the user closes the dialog, exec() will
- provide a useful \link #return return value\endlink. Typically,
+ provide a useful \l{#return}{return value}. Typically,
to get the dialog to close and return the appropriate value, we
connect a default button, e.g. \uicontrol OK, to the accept() slot and a
\uicontrol Cancel button to the reject() slot.
\section1 Escape Key
If the user presses the Esc key in a dialog, QDialog::reject()
- will be called. This will cause the window to close: The \link
- QCloseEvent close event \endlink cannot be \link
- QCloseEvent::ignore() ignored \endlink.
+ will be called. This will cause the window to close: The \l{QCloseEvent}{close event} cannot be \l{QCloseEvent::ignore()}{ignored}.
\section1 Extensibility
about() looks for a suitable icon in four locations:
\list 1
- \li It prefers \link QWidget::windowIcon() parent->icon() \endlink
+ \li It prefers \l{QWidget::windowIcon()}{parent->icon()}
if that exists.
\li If not, it tries the top-level widget containing \a parent.
- \li If that fails, it tries the \link
- QApplication::activeWindow() active window. \endlink
+ \li If that fails, it tries the \l{QApplication::activeWindow()}{active window.}
\li As a last resort it uses the Information icon.
\endlist
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+/*!
+ \externalpage http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html
+ \title Apple Human Interface Guidelines
+*/
+
+/*!
+ \externalpage http://www.nvg.ntnu.no/sinclair/computers/zxspectrum/zxspectrum.htm
+ \title Sinclair Spectrum
+*/
To write your own layout class, you must define the following:
\list
\li A data structure to store the items handled by the layout. Each
- item is a \link QLayoutItem QLayoutItem\endlink. We will use a
+ item is a \l{QLayoutItem}{QLayoutItem}. We will use a
QList in this example.
\li \l{QLayout::}{addItem()}, how to add items to the layout.
\li \l{QLayout::}{setGeometry()}, how to perform the layout.
#ifndef QT_NO_CURSOR
/*!
Returns the current cursor shape for the item. The mouse cursor
- will assume this shape when it's over this item. See the \link
- Qt::CursorShape list of predefined cursor objects\endlink for a
+ will assume this shape when it's over this item.
+ See the \l{Qt::CursorShape}{list of predefined cursor objects} for a
range of useful shapes.
An editor item might want to use an I-beam cursor:
/*!
Sets the current cursor shape for the item to \a cursor. The mouse cursor
- will assume this shape when it's over this item. See the \link
- Qt::CursorShape list of predefined cursor objects\endlink for a range of
- useful shapes.
+ will assume this shape when it's over this item.
+ See the \l{Qt::CursorShape}{list of predefined cursor objects} for a
+ range of useful shapes.
An editor item might want to use an I-beam cursor:
\image qcolumnview.png
- \sa \link model-view-programming.html Model/View Programming\endlink
+ \sa \l{model-view-programming.html}{Model/View Programming}
*/
/*!
The selection of drop actions provided by the model will influence the
behavior of the component that started the drag and drop operation.
- \sa \link dnd.html Drag and Drop\endlink
+ \sa \l{dnd.html}{Drag and Drop}
*/
Qt::DropActions QProxyModel::supportedDropActions() const
{
Writes the size \a policy to the data stream \a stream.
- \sa \link datastreamformat.html Format of the QDataStream operators \endlink
+ \sa{Serializing Qt Data Types}{Format of the QDataStream operators}
*/
QDataStream &operator<<(QDataStream &stream, const QSizePolicy &policy)
{
Reads the size \a policy from the data stream \a stream.
- \sa \link datastreamformat.html Format of the QDataStream operators \endlink
+ \sa{Serializing Qt Data Types}{Format of the QDataStream operators}
*/
QDataStream &operator>>(QDataStream &stream, QSizePolicy &policy)
{
"What's This?" help is part of an application's online help
system, and provides users with information about the
functionality and usage of a particular widget. "What's This?"
- help texts are typically longer and more detailed than \link
- QToolTip tooltips\endlink, but generally provide less information
+ help texts are typically longer and more detailed than
+ \l{QToolTip}{tooltips}, but generally provide less information
than that supplied by separate help windows.
QWhatsThis provides a single window with an explanatory text that
\brief the cursor shape for this widget
The mouse cursor will assume this shape when it's over this
- widget. See the \link Qt::CursorShape list of predefined cursor
- objects\endlink for a range of useful shapes.
+ widget. See the \l{Qt::CursorShape}{list of predefined cursor objects} for a range of useful shapes.
An editor widget might use an I-beam cursor:
\snippet code/src_gui_kernel_qwidget.cpp 6
/*!
Gives the keyboard input focus to this widget (or its focus
- proxy) if this widget or one of its parents is the \link
- isActiveWindow() active window\endlink. The \a reason argument will
+ proxy) if this widget or one of its parents is the \l{isActiveWindow()}{active window}. The \a reason argument will
be passed into any focus event sent from this function, it is used
to give an explanation of what caused the widget to get focus.
If the window is not active, the widget will be given the focus when
/*!
Takes keyboard input focus from the widget.
- If the widget has active focus, a \link focusOutEvent() focus out
- event\endlink is sent to this widget to tell it that it has
+ If the widget has active focus, a \l{focusOutEvent()}{focus out event} is sent to this widget to tell it that it has
lost the focus.
This widget must enable focus setting in order to get the keyboard
event that the widget receives. Normally this is in widget
coordinates. The exception to this rule is QAbstractScrollArea and
its subclasses that map the context menu event to coordinates of the
- \link QAbstractScrollArea::viewport() viewport() \endlink .
+ \l{QAbstractScrollArea::viewport()}{viewport()}.
\sa mapToGlobal(), QMenu, contextMenuPolicy
Closes this widget. Returns true if the widget was closed;
otherwise returns false.
- First it sends the widget a QCloseEvent. The widget is \link
- hide() hidden\endlink if it \link QCloseEvent::accept()
- accepts\endlink the close event. If it \link QCloseEvent::ignore()
- ignores\endlink the event, nothing happens. The default
+ First it sends the widget a QCloseEvent. The widget is
+ \l{hide()}{hidden} if it \l{QCloseEvent::accept()}{accepts}
+ the close event. If it \l{QCloseEvent::ignore()}{ignores}
+ the event, nothing happens. The default
implementation of QWidget::closeEvent() accepts the close event.
If the widget has the Qt::WA_DeleteOnClose flag, the widget
subclass to receive wheel events for the widget.
If you reimplement this handler, it is very important that you
- \link QWheelEvent ignore()\endlink the event if you do not handle
+ \l{QWheelEvent}{ignore()} the event if you do not handle
it, so that the widget's parent can interpret it.
The default implementation ignores the event.
subclass to receive tablet events for the widget.
If you reimplement this handler, it is very important that you
- \link QTabletEvent ignore()\endlink the event if you do not handle
+ \l{QTabletEvent}{ignore()} the event if you do not handle
it, so that the widget's parent can interpret it.
The default implementation ignores the event.
This event handler, for event \a event, can be reimplemented in a
subclass to receive key release events for the widget.
- A widget must \link setFocusPolicy() accept focus\endlink
- initially and \link hasFocus() have focus\endlink in order to
+ A widget must \l{setFocusPolicy()}{accept focus}
+ initially and \l{hasFocus()}{have focus} in order to
receive a key release event.
If you reimplement this handler, it is very important that you
If the event is ignored, the widget won't receive any \l{dragMoveEvent()}{drag
move events}.
- See the \link dnd.html Drag-and-drop documentation\endlink for an
+ See the \l{dnd.html}{Drag-and-drop documentation} for an
overview of how to provide drag-and-drop in your application.
\sa QDrag, QDragEnterEvent
the keyboard while this widget has the focus. The event is passed
in the \a event parameter.
- See the \link dnd.html Drag-and-drop documentation\endlink for an
+ See the \l{dnd.html}{Drag-and-drop documentation} for an
overview of how to provide drag-and-drop in your application.
\sa QDrag, QDragMoveEvent
mouse leaves this widget. The event is passed in the \a event
parameter.
- See the \link dnd.html Drag-and-drop documentation\endlink for an
+ See the \l{dnd.html}{Drag-and-drop documentation} for an
overview of how to provide drag-and-drop in your application.
\sa QDrag, QDragLeaveEvent
This event handler is called when the drag is dropped on this
widget. The event is passed in the \a event parameter.
- See the \link dnd.html Drag-and-drop documentation\endlink for an
+ See the \l{dnd.html}{Drag-and-drop documentation} for an
overview of how to provide drag-and-drop in your application.
\sa QDrag, QDropEvent
There are additional issues that should be taken
into consideration to make an application compatible with the
- \link http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html
- Apple Human Interface Guidelines \endlink. Some of these issues are outlined
+ \l{Apple Human Interface Guidelines}{Apple Human Interface Guidelines}. Some of these issues are outlined
below.
\list
applications, which may not be yours and hence not available for
you to recompile. The Qt Plugin system makes it possible to create
styles as plugins. Styles created as plugins are loaded as shared
- objects at runtime by Qt itself. Please refer to the \link
- plugins-howto.html Qt Plugin\endlink documentation for more
+ objects at runtime by Qt itself. Please refer to the \l{plugins-howto.html}{Qt Plugin} documentation for more
information on how to go about creating a style plugin.
Compile your plugin and put it into Qt's \c plugins/styles
\inmodule QtWidgets
For an overview of the Qt's undo framework, see the
- \link qundo.html overview\endlink.
+ \l{qundo.html}{overview}.
An application often has multiple undo stacks, one for each opened document. At the
same time, an application usually has one undo action and one redo action, which
All signals associated with a click are emitted as appropriate.
-This function does nothing if the button is \link setEnabled()
-disabled. \endlink
+This function does nothing if the button is \l{setEnabled()}{disabled.}
\sa click()
*/
appropriate. If the button is checkable, the state of the button is
toggled.
-This function does nothing if the button is \link setEnabled()
-disabled. \endlink
+This function does nothing if the button is \l{setEnabled()}{disabled.}
\sa animateClick()
*/
\section1 Appearance
A QDockWidget consists of a title bar and the content area. The
- title bar displays the dock widgets \link QWidget::windowTitle()
- window title\endlink, a \e float button and a \e close button.
+ title bar displays the dock widgets
+ \l{QWidget::windowTitle()}{window title},
+ a \e float button and a \e close button.
Depending on the state of the QDockWidget, the \e float and \e
close buttons may be either disabled or not shown at all.
If you set the rectangle to a null rectangle (for example,
QRect(0, 0, 0, 0)), then the resulting frame rectangle is
- equivalent to the \link QWidget::rect() widget rectangle\endlink.
+ equivalent to the \l{QWidget::rect()}{widget rectangle}.
*/
QRect QFrame::frameRect() const
store the value there.
Incidentally, QLCDNumber is the very oldest part of Qt, tracing
- its roots back to a BASIC program on the \link
- http://www.nvg.ntnu.no/sinclair/computers/zxspectrum/zxspectrum.htm
- Sinclair Spectrum\endlink.
+ its roots back to a BASIC program on the \l{Sinclair Spectrum}{Sinclair Spectrum}.
\table
\row \li \inlineimage motif-lcdnumber.png Screenshot of a Motif style LCD number widget
\endtable
To get range control (e.g., for an IP address) use masks together
- with \link setValidator() validators\endlink.
+ with \l{setValidator()}{validators}.
\sa maxLength
*/
}
/*!
- Undoes the last operation if undo is \link
- QLineEdit::undoAvailable available\endlink. Deselects any current
+ Undoes the last operation if undo is \l{QLineEdit::undoAvailable}{available}. Deselects any current
selection, and updates the selection start to the current cursor
position.
*/
}
/*!
- Redoes the last operation if redo is \link
- QLineEdit::redoAvailable available\endlink.
+ Redoes the last operation if redo is \l{QLineEdit::redoAvailable}{available}.
*/
void QLineEdit::redo()
{
/*!
Inserts the clipboard's text at the cursor position, deleting any
- selected text, providing the line edit is not \link
- QLineEdit::readOnly read-only\endlink.
+ selected text, providing the line edit is not \l{QLineEdit::readOnly}{read-only}.
If the end result would not be acceptable to the current
- \link setValidator() validator\endlink, nothing happens.
+ \l{setValidator()}{validator}, nothing happens.
\sa copy(), cut()
*/
Converts the given key press \a event into a line edit action.
If Return or Enter is pressed and the current text is valid (or
- can be \link QValidator::fixup() made valid\endlink by the
+ can be \l{QValidator::fixup()}{made valid} by the
validator), the signal returnPressed() is emitted.
The default key bindings are listed in the class's detailed
Saves the current state of this mainwindow's toolbars and
dockwidgets. The \a version number is stored as part of the data.
- The \link QObject::objectName objectName\endlink property is used
+ The \l{QObject::objectName}{objectName} property is used
to identify each QToolBar and QDockWidget. You should make sure
that this property is unique for each QToolBar and QDockWidget you
add to the QMainWindow
\inmodule QtWidgets
QTabBar is straightforward to use; it draws the tabs using one of
- the predefined \link QTabBar::Shape shapes\endlink, and emits a
+ the predefined \l{QTabBar::Shape}{shapes}, and emits a
signal when a tab is selected. It can be subclassed to tailor the
look and feel. Qt also provides a ready-made \l{QTabWidget}.
\overload
Creates a new action with the given \a text. This action is added to
- the end of the toolbar. The action's \link QAction::triggered()
- triggered()\endlink signal is connected to \a member in \a
- receiver.
+ the end of the toolbar. The action's \l{QAction::triggered()}{triggered()}
+ signal is connected to \a member in \a receiver.
*/
QAction *QToolBar::addAction(const QString &text,
const QObject *receiver, const char* member)
\overload
Creates a new action with the icon \a icon and text \a text. This
- action is added to the end of the toolbar. The action's \link
- QAction::triggered() triggered()\endlink signal is connected to \a
+ action is added to the end of the toolbar. The action's
+ \l{QAction::triggered()}{triggered()} signal is connected to \a
member in \a receiver.
*/
QAction *QToolBar::addAction(const QIcon &icon, const QString &text,