summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qnamespace.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global/qnamespace.qdoc')
-rw-r--r--src/corelib/global/qnamespace.qdoc232
1 files changed, 165 insertions, 67 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 17396432d5..ddfade675a 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1,30 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Copyright (C) 2020 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2022 The Qt Company Ltd.
+// Copyright (C) 2020 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\namespace Qt
@@ -108,6 +84,19 @@
QCoreApplication::testAttribute().
+ \value [since 6.7] AA_QtQuickUseDefaultSizePolicy Qt Quick Layouts use the built-in size
+ policy of \l Item. For example, when this is set, \l Button fills the available
+ width, but has a fixed height. When this is not set, it will use the default
+ sizing behavior of the layout it's in, which is to use its implicit size as the
+ preferred size. This is explained in detail in \l {Specifying preferred size} and
+ \l {Size constraints}. When this is set, the default size policy of the item
+ with the layout can be overridden by explicitly setting
+ \l{Layout::fillWidth}{Layout.fillWidth} or
+ \l{Layout::fillHeight}{Layout.fillHeight}.
+ \b Note: This API is considered tech preview and may change or be removed in future
+ versions of Qt.
+
+
\value AA_DontShowIconsInMenus Actions with the Icon property won't be
shown in any menus unless specifically set by the
QAction::iconVisibleInMenu property.
@@ -118,9 +107,11 @@
\value AA_DontShowShortcutsInContextMenus Actions with the Shortcut property
won't be shown in any shortcut menus unless specifically set by the
QAction::shortcutVisibleInContextMenu property. This value was added
- in Qt 5.10, and defaults to the preference reported by the implementation
- of QPlatformIntegration::styleHint. To override the platform integration,
- set this attribute after QCoreApplication has been instantiated.
+ in Qt 5.10, and is by default based on the value reported by
+ QStyleHints::showShortcutsInContextMenus(). To override the default
+ behavior, set the style hint before QCoreApplication has been
+ instantiated, or set this attribute after QCoreApplication has
+ been instantiated.
\value AA_NativeWindows Ensures that widgets have native windows.
@@ -142,15 +133,15 @@
set to true won't be used as a native menubar (e.g, the menubar at
the top of the main screen on \macos).
- \value AA_MacDontSwapCtrlAndMeta Keyboard shortcuts on \macos are typically
+ \value AA_MacDontSwapCtrlAndMeta Keyboard shortcuts on Apple platforms are typically
based on the Command (or Cmd) keyboard modifier, represented by
the ⌘ symbol. For example, the 'Copy' action is Command+C (⌘+C).
To ease cross platform development Qt will by default remap Command
to the Qt::ControlModifier, to align with other platforms. This
allows creating keyboard shortcuts such as "Ctrl+J", which on
\macos will then map to Command+J, as expected by \macos users. The
- actual Control (or Ctrl) modifier on \macos, represented by ⌃, is
- mapped to Qt::MetaModifier.
+ actual Control (or Ctrl) modifier on Apple platforms, represented by ⌃,
+ is mapped to Qt::MetaModifier.
When this attribute is true Qt will not do the remapping, and pressing
the Command modifier will result in Qt::MetaModifier, while pressing
@@ -213,9 +204,9 @@
\value AA_UseStyleSheetPropagationInWidgetStyles By default, Qt Style Sheets
disable regular QWidget palette and font propagation. When this flag
- is enabled, font and palette changes propagate as though the user had
- manually called the corresponding QWidget methods. See
- \l{The Style Sheet Syntax#Inheritance}{The Style Sheet Syntax - Inheritance}
+ is enabled, font and palette changes done from a style sheet will propagate
+ a single time, when the style sheet is set.
+ See \l{The Style Sheet Syntax#Inheritance}{The Style Sheet Syntax - Inheritance}
for more details.
This value was added in Qt 5.7.
@@ -282,6 +273,17 @@
Currently supported on the Windows platform only.
This value was added in 5.15
+ \value AA_DontUseNativeMenuWindows Menu popup windows (e.g. context menus,
+ combo box menus, and non-native menubar menus) created while this
+ attribute is set to true will not be represented as native top
+ level windows, unless required by the implementation.
+ This value was added in Qt 6.8.
+
+ \value AA_DontUsePopupWindows When this attribute is set, popups will always appear
+ as items in the scene, rather than having their own dedicated windows.
+ Setting this attribute will only affect Qt Quick applications.
+ This value was added in Qt 6.8.
+
\omitvalue AA_AttributeCount
\omitvalue AA_EnableHighDpiScaling
\omitvalue AA_UseHighDpiPixmaps
@@ -639,7 +641,7 @@
connection types, using a bitwise OR. When Qt::UniqueConnection is
set, QObject::connect() will fail if the connection already exists
(i.e. if the same signal is already connected to the same slot
- for the same pair of objects). This flag was introduced in Qt 4.6.
+ for the same pair of objects).
\value SingleShotConnection
This is a flag that can be combined with any one of the above
@@ -752,15 +754,25 @@
Mean Time has zero offset from it. Neither UTC nor OffsetFromUTC
has any transitions.
+ When specifying a datetime using OffsetFromUTC, the offset from UTC must
+ also be supplied (it is measured in seconds). To specify a datetime using
+ TimeZone, a QTimeZone must be supplied. From Qt 6.5, a QTimeZone can now
+ package a timespec with, where needed, an offset as a lightweight time
+ description, so that passing a QTimeZone now provides a uniform way to use
+ datetime APIs, saving the need to call them differently for different
+ timespecs.
+
\note After a change to the system time-zone setting, the behavior
of LocalTime-based QDateTime objects created before the change is
undefined: QDateTime may have cached data that the change
- invalidates. (This is not triggered by transitions of the system
+ invalidates. (This is not triggered by \e transitions of the system
time-zone.) In long-running processes, updates to the system's
time-zone data (e.g. when politicians change the rules for a zone)
may likewise lead to conflicts between the updated time-zone
information and data cached by QDateTime objects created before
the update, using either LocalTime or TimeZone.
+
+ \sa QTimeZone, QDateTime
*/
/*!
@@ -798,14 +810,29 @@
/*!
\enum Qt::DockWidgetArea
- \value LeftDockWidgetArea
- \value RightDockWidgetArea
- \value TopDockWidgetArea
- \value BottomDockWidgetArea
- \value AllDockWidgetAreas
- \value NoDockWidgetArea
+ Represents the areas a QDockWidget can be plugged to.
+ \note A floating dock widget with tabs can be docked anywhere.
+
+ \value LeftDockWidgetArea The left dock area of a QMainWindow.
+ \value RightDockWidgetArea The right dock area of a QMainWindow.
+ \value TopDockWidgetArea The top dock area of a QMainWindow.
+ \value BottomDockWidgetArea The bottom dock area of a QMainWindow.
+ \value AllDockWidgetAreas All dock widget areas (default).
+ \value NoDockWidgetArea No dock widget areas.
\omitvalue DockWidgetArea_Mask
+ \sa QDockWidget::setAllowedAreas, QDockWidget::isAreaAllowed
+*/
+
+/*!
+ \enum Qt::ColorScheme
+
+ Represents the appearance of an application's theme,
+ defined by QGuiApplication::palette().
+
+ \value Unknown The appearance is unknown.
+ \value Light The background colors are lighter than the text color, i.e. the theme is light.
+ \value Dark The background colors are darker than the text color, i.e. the theme is dark.
*/
/*!
@@ -977,8 +1004,7 @@
\value WA_Hover Forces Qt to generate paint events when the mouse
enters or leaves the widget. This feature is typically used when
- implementing custom styles; see the \l{widgets/styles}{Styles}
- example for details.
+ implementing custom styles.
\value WA_InputMethodEnabled Enables input methods for Asian languages.
Must be set when creating custom text editing widgets.
@@ -1126,10 +1152,10 @@
e.g., when a hidden widget was resized. This flag is set or cleared by the
Qt kernel.
- \value WA_QuitOnClose Makes Qt quit the application when the last widget
- with the attribute set has accepted closeEvent(). This behavior can be
- modified with the QApplication::quitOnLastWindowClosed property. By default
- this attribute is set for all widgets of type Qt::Window.
+ \value WA_QuitOnClose Indicates that the widget should be taken into account
+ when deciding whether to quit the application when the last window is closed.
+ This behavior can be modified with the QGuiApplication::quitOnLastWindowClosed
+ property. By default this attribute is set for all widgets of type Qt::Window.
\value WA_Resized Indicates that the widget has an explicit size. This flag
is set or cleared by QWidget::resize() and QWidget::setGeometry().
@@ -1303,7 +1329,7 @@
to this top level window. This attribute has no effect on non-X11
platforms.
- \value WA_AlwaysStackOnTop Since Qt 5.4, this value forces QOpenGLWidget and
+ \value [since 5.4] WA_AlwaysStackOnTop Forces QOpenGLWidget and
QQuickWidget to be drawn last, on top of other widgets. Ignored for other
type of widgets. Setting this attribute breaks the stacking order, but
allows having a semi-transparent OpenGL widget with other widgets visible
@@ -1439,6 +1465,7 @@
\value Key_Help
\value Key_Direction_L
\value Key_Direction_R
+
\value Key_Space
\value Key_Any
\value Key_Exclam
@@ -1530,7 +1557,8 @@
\value Key_twosuperior
\value Key_threesuperior
\value Key_acute
- \value Key_mu
+ \value [since 6.7] Key_micro
+ \value Key_mu Deprecated alias for Key_micro
\value Key_paragraph
\value Key_periodcentered
\value Key_cedilla
@@ -1575,6 +1603,7 @@
\value Key_ssharp
\value Key_division
\value Key_ydiaeresis
+
\value Key_Multi_key
\value Key_Codeinput
\value Key_SingleCandidate
@@ -2222,11 +2251,17 @@
you call QWidget::activateWindow() manually).
\value FramelessWindowHint Produces a borderless window.
- The user cannot move or resize a borderless window via the window
- system. On X11, the result of the flag is dependent on the window manager and its
+
+ On X11, the result of the flag is dependent on the window manager and its
ability to understand Motif and/or NETWM hints. Most existing
modern window managers can handle this.
+ \note If the window manager relies on the frame to interactively manipulate
+ the window, the user can no longer move or resize the window via the window
+ system, but this side effect should not be relied on. To produce a fixed
+ size window that can not be resized, please set QWindow::setMinimumSize()
+ and QWindow::setMaximumSize() to the same size.
+
\value NoDropShadowWindowHint Disables window drop shadow on supporting platforms.
The \c CustomizeWindowHint flag is used to enable customization of
@@ -2659,7 +2694,8 @@
\value ImCursorRectangle The rectangle covering the area of the input cursor in widget coordinates.
\value ImFont The currently used font for text input.
\value ImCursorPosition The logical position of the cursor within the text surrounding the input area
- (see \c ImSurroundingText).
+ (see \c ImSurroundingText). The position does not incorporate the offset of
+ the cursor within the preedit area, as controlled by QInputMethodEvent::Cursor.
\value ImSurroundingText The plain text around the input area, for example the current paragraph.
\value ImCurrentSelection The currently selected text.
\value ImMaximumTextLength The maximum number of characters that the widget can hold. If there is no limit,
@@ -2670,7 +2706,9 @@
\value ImHints The hints for input method on expected input. (See Qt::InputMethodHints)
\value ImPreferredLanguage The preferred input language.
\value ImPlatformData Platform specific data for input method.
- \value ImAbsolutePosition The logical position of the cursor within the entire document.
+ \value ImAbsolutePosition The logical position of the cursor within the entire document. The position does
+ not incorporate the offset of the cursor within the preedit area, as controlled
+ by QInputMethodEvent::Cursor.
\value ImTextBeforeCursor The plain text before the cursor. The widget can decide how much text to return,
but \b{must} not return an empty string unless the cursor is at the start of the document.
\value ImTextAfterCursor The plain text after the cursor. The widget can decide how much text to return,
@@ -2758,8 +2796,7 @@
\value CheckStateRole This role is used to obtain the checked state of
an item. (Qt::CheckState)
\value InitialSortOrderRole This role is used to obtain the initial sort order
- of a header view section. (Qt::SortOrder). This
- role was introduced in Qt 4.8.
+ of a header view section. (Qt::SortOrder).
Accessibility roles (with associated types):
@@ -2862,7 +2899,10 @@
\value ElideLeft The ellipsis should appear at the beginning of the text.
\value ElideRight The ellipsis should appear at the end of the text.
\value ElideMiddle The ellipsis should appear in the middle of the text.
- \value ElideNone Ellipsis should NOT appear in the text.
+ \value ElideNone Ellipsis should NOT appear in the text. When passed to functions such as
+ QFontMetrics::elidedText(), this will cause the full string to return unless
+ the text contains multi-length variants. Elision in this case must be done
+ by clipping to the component width.
Qt::ElideMiddle is normally the most appropriate choice for URLs (e.g.,
"\l{http://bugreports.qt.io/browse/QTWEBSITE-13}{http://bugreports.qt.../QTWEBSITE-13/}"),
@@ -3027,6 +3067,11 @@
*/
/*!
+ \enum Qt::Disambiguated_t
+ \internal
+*/
+
+/*!
\enum Qt::CoordinateSystem
\since 4.6
@@ -3107,8 +3152,8 @@
the Qt::GestureStarted state and ending with a gesture in the
Qt::GestureFinished or Qt::GestureCanceled states.
- \value IgnoredGesturesPropagateToParent Since Qt 4.7, this flag allows you
- to fine-tune gesture event propagation. By setting the flag when
+ \value [since 4.7] IgnoredGesturesPropagateToParent Allows fine-tuning of
+ gesture event propagation. By setting the flag when
\l{QGraphicsObject::grabGesture()}{grabbing} a gesture all ignored partial
gestures will propagate to their parent items.
@@ -3123,12 +3168,11 @@
\value BeginNativeGesture Sent before gesture event stream.
\value EndNativeGesture Sent after gesture event stream.
- \value PanNativeGesture Sent after a panning gesture.
- Similar to a click-and-drag mouse movement.
+ \value PanNativeGesture Specifies the displacement delta in pixels.
\value ZoomNativeGesture Specifies the magnification delta in percent.
\value SmartZoomNativeGesture Boolean magnification state.
- \value RotateNativeGesture Rotation delta in degrees.
- \value SwipeNativeGesture Sent after a swipe movements.
+ \value RotateNativeGesture Specifies the rotation delta in degrees.
+ \value SwipeNativeGesture Sent after a swipe movement.
*/
@@ -3197,6 +3241,26 @@
*/
/*!
+ \enum Qt::TimerId
+ \since 6.8
+ \relates QObject
+ \relates QTimer
+ \relates QChronoTimer
+
+ This is used to represent timer IDs (for example, QTimer and QChronoTimer).
+ The underlying type is \c int. You can use \l qToUnderlying() to convert
+ Qt::TimerId to \c int.
+
+ \value Invalid Represents a no-op timer ID; it's usage depends on the
+ context, for example, this is the value returned by QObject::startTimer()
+ to indicate it failed to start a timer; whereas QChronoTimer::id() returns
+ this value when the timer is inactive, that is, \c timer.isActive()
+ returns \c false.
+
+ \sa QTimer::id(), QChronoTimer::id(), QObject::startTimer()
+*/
+
+/*!
\enum Qt::ScrollPhase
\since 5.2
@@ -3292,6 +3356,38 @@
*/
/*!
+ \enum Qt::PermissionStatus
+
+ This enum describes the possible statuses of a permissions.
+
+ \value Undetermined
+ The permission status is not yet known. Permission should be requested
+ via QCoreApplication::requestPermission() to determine the actual status.
+ This status will never be the result of requesting a permission.
+
+ \value Granted
+ The user has explicitly granted the application the permission,
+ or the permission is known to not require user authorization on
+ the given platform.
+
+ \value Denied
+ The user has explicitly denied the application the requested permission,
+ or the permission is known to not be accessible or applicable to applications
+ on the given platform.
+
+ \note On Android, there is no \c Undetermined status by the platform's APIs.
+ Thus, if a permission is denied for an app,
+ \l QCoreApplication::checkPermission() returns \c Undetermined
+ by default until \l QCoreApplication::requestPermission() is called.
+ After that \l QCoreApplication::checkPermission() reports a non \c Undetermined
+ status.
+
+ \since 6.5
+ \sa QCoreApplication::requestPermission(), QCoreApplication::checkPermission(),
+ {Application Permissions}
+*/
+
+/*!
\enum Qt::ReturnByValueConstant
\since 5.15
@@ -3311,6 +3407,8 @@
\since 6.0
\brief The QKeyCombination class stores a combination of a key with optional modifiers.
+ \compares equality
+
The QKeyCombination class can be used to represent a combination of a key
with zero or more keyboard modifiers.
@@ -3393,14 +3491,14 @@
#endif
/*!
- \fn bool QKeyCombination::operator==(QKeyCombination lhs, QKeyCombination rhs) noexcept
+ \fn bool QKeyCombination::operator==(const QKeyCombination &lhs, const QKeyCombination &rhs)
Returns \c true if \a lhs and \a rhs have the same combination
of key and modifiers, and \c false otherwise.
*/
/*!
- \fn bool QKeyCombination::operator!=(QKeyCombination lhs, QKeyCombination rhs) noexcept
+ \fn bool QKeyCombination::operator!=(const QKeyCombination &lhs, const QKeyCombination &rhs)
Returns \c true if \a lhs and \a rhs have different combinations
of key and modifiers, otherwise \c false.