Qt¶
- PyQt5.QtCore.Qt
Description¶
TODO
Classes¶
Enums¶
- AlignmentFlag
This enum type is used to describe alignment. It contains horizontal and vertical flags that can be combined to produce the required effect.
The TextElideMode enum can also be used in many situations to fine-tune the appearance of aligned text.
The horizontal flags are:
The vertical flags are:
You can use only one of the horizontal flags at a time. There is one two-dimensional flag:
You can use at most one horizontal and one vertical flag at a time. counts as both horizontal and vertical.
Three enum values are useful in applications that can be run in right-to-left mode:
Masks:
Conflicting combinations of flags have undefined meanings.
Member
Value
Description
AlignAbsolute 0x0010
If the widget’s layout direction is RightToLeft (instead of LeftToRight, the default), refers to the right edge and to the left edge. This is normally the desired behavior. If you want to always mean “left” and to always mean “right”, combine the flag with .
AlignBaseline TODO
Aligns with the baseline.
AlignBottom 0x0040
Aligns with the bottom.
AlignCenter AlignVCenter | AlignHCenter
Centers in both dimensions.
AlignHCenter 0x0004
Centers horizontally in the available space.
AlignHorizontal_Mask TODO
TODO
AlignJustify 0x0008
Justifies the text in the available space.
AlignLeading AlignLeft
Synonym for .
AlignLeft 0x0001
Aligns with the left edge.
AlignRight 0x0002
Aligns with the right edge.
AlignTop 0x0020
Aligns with the top.
AlignTrailing AlignRight
Synonym for .
AlignVCenter 0x0080
Centers vertically in the available space.
AlignVertical_Mask TODO
TODO
- AnchorPoint
Specifies a side of a layout item that can be anchored. This is used by QGraphicsAnchorLayout.
See also
Member
Value
Description
AnchorBottom 5
The bottom side of a layout item.
AnchorHorizontalCenter 1
A “virtual” side that is centered between the left and the right side of a layout item.
AnchorLeft 0
The left side of a layout item.
AnchorRight 2
The right side of a layout item.
AnchorTop 3
The top side of a layout item.
AnchorVerticalCenter 4
A “virtual” side that is centered between the top and the bottom side of a layout item.
- ApplicationAttribute
This enum describes attributes that change the behavior of application-wide features. These are enabled and disabled using setAttribute(), and can be tested for with testAttribute().
The following values are deprecated or obsolete:
Member
Value
Description
AA_CompressHighFrequencyEvents TODO
Enables compression of certain frequent events. On the X11 windowing system, the default value is true, which means that MouseMove, TouchUpdate, and changes in window size and position will be combined whenever they occur more frequently than the application handles them, so that they don’t accumulate and overwhelm the application later. On Windows 8 and above the default value is also true, but it only applies to touch events. Mouse and window events remain unaffected by this flag. On other platforms, the default is false. (In the future, the compression feature may be implemented across platforms.) You can test the attribute to see whether compression is enabled. If your application needs to handle all events with no compression, you can unset this attribute. Notice that input events from tablet devices will not be compressed. See AA_CompressTabletEvents if you want these to be compressed as well. This value was added in Qt 5.7.
AA_CompressTabletEvents TODO
Enables compression of input events from tablet devices. Notice that AA_CompressHighFrequencyEvents must be true for events compression to be enabled, and that this flag extends the former to tablet events. Currently supported on the X11 windowing system, Windows 8 and above. The default value is false. This value was added in Qt 5.10.
AA_DisableHighDpiScaling TODO
Disables high-DPI scaling in Qt, exposing window system coordinates. Note that the window system may do its own scaling, so this does not guarantee that QPaintDevice::devicePixelRatio() will be equal to 1. In addition, scale factors set by QT_SCALE_FACTOR will not be affected. This corresponds to setting the QT_AUTO_SCREEN_SCALE_FACTOR environment variable to 0. This attribute must be set before QGuiApplication is constructed. This value was added in Qt 5.6.
AA_DisableNativeVirtualKeyboard TODO
TODO
AA_DisableSessionManager TODO
TODO
AA_DisableShaderDiskCache TODO
Disables caching of shader program binaries on disk. By default Qt Quick, QPainter’s OpenGL backend, and any application using QOpenGLShaderProgram with one of its addCacheableShaderFromSource overloads will employ a disk-based program binary cache in either the shared or per-process cache storage location, on systems that support glProgramBinary(). In the unlikely event of this being problematic, set this attribute to disable all disk-based caching of shaders.
AA_DisableWindowContextHelpButton TODO
Disables the WindowContextHelpButtonHint by default on Sheet and Dialog widgets. This hides the ? button on Windows, which only makes sense if you use QWhatsThis functionality. This value was added in Qt 5.10. In Qt 6, WindowContextHelpButtonHint will not be set by default.
AA_DontCheckOpenGLContextThreadAffinity TODO
When making a context current using QOpenGLContext, do not check that the QObject thread affinity of the QOpenGLContext object is the same thread calling makeCurrent(). This value was added in Qt 5.8.
AA_DontCreateNativeWidgetSiblings 4
Ensures that siblings of native widgets stay non-native unless specifically set by the WA_NativeWindow attribute.
AA_DontShowIconsInMenus 2
Actions with the Icon property won’t be shown in any menus unless specifically set by the QAction::iconVisibleInMenu property. Menus that are currently open or menus already created in the native macOS menubar may not pick up a change in this attribute. Changes in the QAction::iconVisibleInMenu property will always be picked up.
AA_DontShowShortcutsInContextMenus TODO
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.
AA_DontUseNativeDialogs TODO
All dialogs created while this attribute is set to true won’t use the native dialogs provided by the platform. This value was added in Qt 5.7.
AA_DontUseNativeMenuBar 6
All menubars created while this attribute is set to true won’t be used as a native menubar (e.g, the menubar at the top of the main screen on macOS).
AA_EnableHighDpiScaling TODO
Enables high-DPI scaling in Qt on supported platforms (see also High DPI Displays). Supported platforms are X11, Windows and Android. Enabling makes Qt scale the main (device independent) coordinate system according to display scale factors provided by the operating system. This corresponds to setting the QT_AUTO_SCREEN_SCALE_FACTOR environment variable to 1. This attribute must be set before QGuiApplication is constructed. This value was added in Qt 5.6.
AA_ForceRasterWidgets TODO
Make top-level widgets use pure raster surfaces, and do not support non-native GL-based child widgets.
AA_ImmediateWidgetCreation 0
This attribute is no longer fully supported in Qt 5. It ensures that widgets are created as soon as they are constructed. By default, resources for widgets are allocated on demand to improve efficiency and minimize resource usage. Setting or clearing this attribute affects widgets constructed after the change. Setting it tells Qt to create toplevel windows immediately. Therefore, if it is important to minimize resource consumption, do not set this attribute.
AA_MacDontSwapCtrlAndMeta 7
On macOS by default, Qt swaps the Control and Meta (Command) keys (i.e., whenever Control is pressed, Qt sends Meta, and whenever Meta is pressed Control is sent). When this attribute is true, Qt will not do the flip. StandardKey will also flip accordingly (i.e., Copy will be Command C on the keyboard regardless of the value set, though what is output for toString() will be different).
AA_MacPluginApplication 5
This attribute has been deprecated. Use AA_PluginApplication instead.
AA_MSWindowsUseDirect3DByDefault 1
This value is obsolete and has no effect.
AA_NativeWindows 3
Ensures that widgets have native windows.
AA_PluginApplication TODO
Indicates that Qt is used to author a plugin. Depending on the operating system, it suppresses specific initializations that do not necessarily make sense in the plugin case. For example on macOS, this includes avoiding loading our nib for the main menu and not taking possession of the native menu bar. Setting this attribute to true will also set the attribute to true. It also disables native event filters. This attribute must be set before QGuiApplication constructed. This value was added in Qt 5.7.
AA_SetPalette TODO
Indicates whether a palette was explicitly set on the QGuiApplication. This value was added in Qt 5.5.
AA_ShareOpenGLContexts TODO
Enables resource sharing between the OpenGL contexts used by classes like QOpenGLWidget and QQuickWidget. This allows sharing OpenGL resources, like textures, between QOpenGLWidget instances that belong to different top-level windows. This attribute must be set before QGuiApplication is constructed. This value was added in Qt 5.4.
AA_SynthesizeMouseForUnhandledTabletEvents TODO
All tablet events that are not accepted by the application will be translated to mouse events instead. This attribute is enabled by default. This value was added in Qt 5.7.
AA_SynthesizeMouseForUnhandledTouchEvents TODO
All touch events that are not accepted by the application will be translated to left button mouse events instead. This attribute is enabled by default.
AA_SynthesizeTouchForUnhandledMouseEvents TODO
All mouse events that are not accepted by the application will be translated to touch events instead.
AA_Use96Dpi TODO
Assume the screen has a resolution of 96 DPI rather than using the OS-provided resolution. This will cause font rendering to be consistent in pixels-per-point across devices rather than defining 1 point as 1/72 inch.
AA_UseDesktopOpenGL TODO
Forces the usage of desktop OpenGL (for example, opengl32.dll or libGL.so) on platforms that use dynamic loading of the OpenGL implementation. This attribute must be set before QGuiApplication is constructed. This value was added in Qt 5.3.
AA_UseHighDpiPixmaps TODO
Make pixmap() generate high-dpi pixmaps that can be larger than the requested size. Such pixmaps will have devicePixelRatio() set to a value higher than 1. After setting this attribute, application code that uses pixmap sizes in layout geometry calculations should typically divide by devicePixelRatio() to get device-independent layout geometry.
AA_UseOpenGLES TODO
Forces the usage of OpenGL ES 2.0 or higher on platforms that use dynamic loading of the OpenGL implementation. This attribute must be set before QGuiApplication is constructed. This value was added in Qt 5.3.
AA_UseSoftwareOpenGL TODO
Forces the usage of a software based OpenGL implementation on platforms that use dynamic loading of the OpenGL implementation. This will typically be a patched build of Mesa llvmpipe, providing OpenGL 2.1. The value may have no effect if no such OpenGL implementation is available. The default name of this library is
opengl32sw.dll
and can be overridden by setting the environment variable QT_OPENGL_DLL. See the platform-specific pages, for instance Qt for Windows, for more information. This attribute must be set before QGuiApplication is constructed. This value was added in Qt 5.4.AA_UseStyleSheetPropagationInWidgetStyles TODO
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 The Style Sheet Syntax - Inheritance for more details. This value was added in Qt 5.7.
AA_X11InitThreads 10
This value is obsolete and has no effect.
- ApplicationState
TODO
Member
Value
Description
ApplicationActive TODO
TODO
ApplicationHidden TODO
TODO
ApplicationInactive TODO
TODO
ApplicationSuspended TODO
TODO
- ArrowType
Member
Value
Description
DownArrow TODO
TODO
LeftArrow TODO
TODO
NoArrow TODO
TODO
RightArrow TODO
TODO
UpArrow TODO
TODO
- AspectRatioMode
This enum type defines what happens to the aspect ratio when scaling an rectangle.
See also
Member
Value
Description
IgnoreAspectRatio 0
The size is scaled freely. The aspect ratio is not preserved.
KeepAspectRatio 1
The size is scaled to a rectangle as large as possible inside a given rectangle, preserving the aspect ratio.
KeepAspectRatioByExpanding 2
The size is scaled to a rectangle as small as possible outside a given rectangle, preserving the aspect ratio.
- Axis
This enum type defines three values to represent the three axes in the cartesian coordinate system.
See also
Member
Value
Description
XAxis 0
The X axis.
YAxis 1
The Y axis.
ZAxis 2
The Z axis.
- BGMode
Background mode:
Member
Value
Description
OpaqueMode TODO
TODO
TransparentMode TODO
TODO
- BrushStyle
This enum type defines the brush styles supported by Qt, i.e. the fill pattern of shapes drawn using QPainter.
See also
Member
Value
Description
BDiagPattern 12
Backward diagonal lines.
ConicalGradientPattern 17
Conical gradient (set using a dedicated QBrush constructor).
CrossPattern 11
Crossing horizontal and vertical lines.
Dense1Pattern 2
Extremely dense brush pattern.
Dense2Pattern 3
Very dense brush pattern.
Dense3Pattern 4
Somewhat dense brush pattern.
Dense4Pattern 5
Half dense brush pattern.
Dense5Pattern 6
Somewhat sparse brush pattern.
Dense6Pattern 7
Very sparse brush pattern.
Dense7Pattern 8
Extremely sparse brush pattern.
DiagCrossPattern 14
Crossing diagonal lines.
FDiagPattern 13
Forward diagonal lines.
HorPattern 9
Horizontal lines.
LinearGradientPattern 15
Linear gradient (set using a dedicated QBrush constructor).
NoBrush 0
No brush pattern.
RadialGradientPattern 16
Radial gradient (set using a dedicated QBrush constructor).
SolidPattern 1
Uniform color.
TexturePattern 24
Custom pattern (see setTexture()).
VerPattern 10
Vertical lines.
- CaseSensitivity
Member
Value
Description
CaseInsensitive TODO
TODO
CaseSensitive TODO
TODO
- CheckState
This enum describes the state of checkable items, controls, and widgets.
See also
Qt::ItemFlags, ItemDataRole, QCheckBox.
Member
Value
Description
Checked 2
The item is checked.
PartiallyChecked 1
The item is partially checked. Items in hierarchical models may be partially checked if some, but not all, of their children are checked.
Unchecked 0
The item is unchecked.
- ChecksumType
TODO
Member
Value
Description
ChecksumIso3309 TODO
TODO
ChecksumItuV41 TODO
TODO
- ClipOperation
Member
Value
Description
IntersectClip 2
Intersects the current clip path/rect/region with the one supplied in the function call.
NoClip 0
This operation turns clipping off.
ReplaceClip 1
Replaces the current clip path/rect/region with the one supplied in the function call.
- ConnectionType
This enum describes the types of connection that can be used between signals and slots. In particular, it determines whether a particular signal is delivered to a slot immediately or queued for delivery at a later time.
With queued connections, the parameters must be of types that are known to Qt’s meta-object system, because Qt needs to copy the arguments to store them in an event behind the scenes. If you try to use a queued connection and get the error message:
# QObject::connect: Cannot queue arguments of type 'MyType'
Call qRegisterMetaType() to register the data type before you establish the connection.
When using signals and slots with multiple threads, see Signals and Slots Across Threads.
See also
QObject::connect(), qRegisterMetaType(), Q_DECLARE_METATYPE(), Thread Support in Qt.
Member
Value
Description
AutoConnection 0
(Default) If the receiver lives in the thread that emits the signal, is used. Otherwise, is used. The connection type is determined when the signal is emitted.
BlockingQueuedConnection 4
Same as , except that the signalling thread blocks until the slot returns. This connection must not be used if the receiver lives in the signalling thread, or else the application will deadlock.
DirectConnection 1
The slot is invoked immediately when the signal is emitted. The slot is executed in the signalling thread.
QueuedConnection 2
The slot is invoked when control returns to the event loop of the receiver’s thread. The slot is executed in the receiver’s thread.
UniqueConnection 0x80
This is a flag that can be combined with any one of the above connection types, using a bitwise OR. When 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.
- ContextMenuPolicy
This enum type defines the various policies a widget can have with respect to showing a context menu.
Member
Value
Description
ActionsContextMenu 2
the widget displays its actions() as context menu.
CustomContextMenu 3
the widget emits the customContextMenuRequested signal.
DefaultContextMenu 1
the widget’s contextMenuEvent() handler is called.
NoContextMenu 0
the widget does not feature a context menu, context menu handling is deferred to the widget’s parent.
PreventContextMenu 4
the widget does not feature a context menu, and in contrast to
NoContextMenu
, the handling is not deferred to the widget’s parent. This means that all right mouse button events are guaranteed to be delivered to the widget itself through mousePressEvent(), and mouseReleaseEvent().
- CoordinateSystem
This enum specifies the coordinate system.
Member
Value
Description
DeviceCoordinates 0
Coordinates are relative to the top-left corner of the object’s paint device.
LogicalCoordinates 1
Coordinates are relative to the top-left corner of the object.
- Corner
This enum type specifies a corner in a rectangle:
Member
Value
Description
BottomLeftCorner 0x00002
The bottom-left corner of the rectangle.
BottomRightCorner 0x00003
The bottom-right corner of the rectangle.
TopLeftCorner 0x00000
The top-left corner of the rectangle.
TopRightCorner 0x00001
The top-right corner of the rectangle.
- CursorMoveStyle
This enum describes the movement style available to text cursors. The options are:
Member
Value
Description
LogicalMoveStyle 0
Within a left-to-right text block, decrease cursor position when pressing left arrow key, increase cursor position when pressing the right arrow key. If the text block is right-to-left, the opposite behavior applies.
VisualMoveStyle 1
Pressing the left arrow key will always cause the cursor to move left, regardless of the text’s writing direction. Pressing the right arrow key will always cause the cursor to move right.
- CursorShape
This enum type defines the various cursors that can be used.
The standard arrow cursor is the default for widgets in a normal state.
Member
Value
Description
ArrowCursor 0
The standard arrow cursor.
BitmapCursor TODO
TODO
BlankCursor 10
A blank/invisible cursor, typically used when the cursor shape needs to be hidden.
BusyCursor 16
An hourglass or watch cursor, usually shown during operations that allow the user to interact with the application while they are performed in the background.
ClosedHandCursor 18
A cursor representing a closed hand, typically used to indicate that a dragging operation is in progress that involves scrolling.
CrossCursor 2
A crosshair cursor, typically used to help the user accurately select a point on the screen.
CustomCursor TODO
TODO
DragCopyCursor 19
A cursor that is usually used when dragging an item to copy it.
DragLinkCursor 21
A cursor that is usually used when dragging an item to make a link to it.
DragMoveCursor 20
A cursor that is usually used when dragging an item.
ForbiddenCursor 14
A slashed circle cursor, typically used during drag and drop operations to indicate that dragged content cannot be dropped on particular widgets or inside certain regions.
IBeamCursor 4
A caret or ibeam cursor, indicating that a widget can accept and display text input.
LastCursor TODO
TODO
OpenHandCursor 17
A cursor representing an open hand, typically used to indicate that the area under the cursor is the visible part of a canvas that the user can click and drag in order to scroll around.
PointingHandCursor 13
A pointing hand cursor that is typically used for clickable elements such as hyperlinks.
SizeAllCursor 9
A cursor used for elements that are used to resize top-level windows in any direction.
SizeBDiagCursor 7
A cursor used for elements that are used to diagonally resize top-level windows at their top-right and bottom-left corners.
SizeFDiagCursor 8
A cursor used for elements that are used to diagonally resize top-level windows at their top-left and bottom-right corners.
SizeHorCursor 6
A cursor used for elements that are used to horizontally resize top-level windows.
SizeVerCursor 5
A cursor used for elements that are used to vertically resize top-level windows.
SplitHCursor 12
A cursor used for horizontal splitters, indicating that a handle can be dragged vertically to adjust the use of available space.
SplitVCursor 11
A cursor used for vertical splitters, indicating that a handle can be dragged horizontally to adjust the use of available space.
UpArrowCursor 1
An arrow pointing upwards toward the top of the screen.
WaitCursor 3
An hourglass or watch cursor, usually shown during operations that prevent the user from interacting with the application.
WhatsThisCursor 15
An arrow with a question mark, typically used to indicate the presence of What’s This? help for a widget.
- DateFormat
Note: For
ISODate
formats, eachY
,M
andD
represents a single digit of the year, month and day used to specify the date. EachH
,M
andS
represents a single digit of the hour, minute and second used to specify the time. The presence of a literalT
character is used to separate the date and time when both are specified.Member
Value
Description
DefaultLocaleLongDate 7
The LongFormat used by the setDefault().
DefaultLocaleShortDate 6
The ShortFormat specified by the setDefault().
ISODate 1
ISO 8601 extended format: either
yyyy-MM-dd
for dates oryyyy-MM-ddTHH:mm:ss
(e.g. 2017-07-24T15:46:29), or with a time-zone suffix (Z for UTC otherwise an offset as [ |-]HH:mm) where appropriate for combined dates and times.ISODateWithMs TODO
ISO 8601 extended format, including milliseconds if applicable.
LocalDate SystemLocaleDate
This enum value is deprecated. Use instead (or if you want long dates).
LocaleDate 3
This enum value is deprecated. Use instead (or if you want long dates).
RFC2822Date TODO
RFC 2822, RFC 850 and RFC 1036 format: either
[ddd,] dd MMM yyyy hh:mm[:ss] /-TZ
orddd MMM dd yyyy hh:mm[:ss] /-TZ
for combined dates and times.SystemLocaleDate 2
This enum value is deprecated. Use instead (or if you want long dates).
SystemLocaleLongDate 5
The LongFormat used by the system().
SystemLocaleShortDate 4
The ShortFormat used by the system().
TextDate 0
The default Qt format, which includes the day and month name, the day number in the month, and the year in full. The day and month names will be short, localized names. This is basically equivalent to using the date format string, “ddd MMM d yyyy”. See toString() for more information.
- DayOfWeek
Member
Value
Description
Friday TODO
TODO
Monday TODO
TODO
Saturday TODO
TODO
Sunday TODO
TODO
Thursday TODO
TODO
Tuesday TODO
TODO
Wednesday TODO
TODO
- DockWidgetArea
Member
Value
Description
AllDockWidgetAreas TODO
TODO
BottomDockWidgetArea TODO
TODO
DockWidgetArea_Mask TODO
TODO
LeftDockWidgetArea TODO
TODO
NoDockWidgetArea TODO
TODO
RightDockWidgetArea TODO
TODO
TopDockWidgetArea TODO
TODO
- DropAction
Member
Value
Description
ActionMask TODO
TODO
CopyAction 0x1
Copy the data to the target.
IgnoreAction 0x0
Ignore the action (do nothing with the data).
LinkAction 0x4
Create a link from the source to the target.
MoveAction 0x2
Move the data from the source to the target.
TargetMoveAction 0x8002
On Windows, this value is used when the ownership of the D&D data should be taken over by the target application, i.e., the source application should not delete the data. On X11 this value is used to do a move. is not used on the Mac.
- Edge
TODO
Member
Value
Description
BottomEdge TODO
TODO
LeftEdge TODO
TODO
RightEdge TODO
TODO
TopEdge TODO
TODO
- EnterKeyType
TODO
Member
Value
Description
EnterKeyDefault TODO
TODO
EnterKeyDone TODO
TODO
EnterKeyGo TODO
TODO
EnterKeyNext TODO
TODO
EnterKeyPrevious TODO
TODO
EnterKeyReturn TODO
TODO
EnterKeySearch TODO
TODO
EnterKeySend TODO
TODO
- EventPriority
This enum can be used to specify event priorities.
Note that these values are provided purely for convenience, since event priorities can be any value between
INT_MAX
andINT_MIN
, inclusive. For example, you can define custom priorities as being relative to each other:# enum CustomEventPriority # { # // An important event # ImportantEventPriority = Qt::HighEventPriority, # // A more important event # MoreImportantEventPriority = ImportantEventPriority 1, # // A critical event # CriticalEventPriority = 100 * MoreImportantEventPriority, # // Not that important # StatusEventPriority = Qt::LowEventPriority, # // These are less important than Status events # IdleProcessingDoneEventPriority = StatusEventPriority - 1 # };
See also
Member
Value
Description
HighEventPriority 1
Events with this priority are sent before events with or .
LowEventPriority -1
Events with this priority are sent after events with or .
NormalEventPriority 0
Events with this priority are sent after events with , but before events with .
- FillRule
Specifies which method should be used to fill the paths and polygons.
Member
Value
Description
OddEvenFill 0
Specifies that the region is filled using the odd even fill rule. With this rule, we determine whether a point is inside the shape by using the following method. Draw a horizontal line from the point to a location outside the shape, and count the number of intersections. If the number of intersections is an odd number, the point is inside the shape. This mode is the default.
WindingFill 1
Specifies that the region is filled using the non zero winding rule. With this rule, we determine whether a point is inside the shape by using the following method. Draw a horizontal line from the point to a location outside the shape. Determine whether the direction of the line at each intersection point is up or down. The winding number is determined by summing the direction of each intersection. If the number is non zero, the point is inside the shape. This fill mode can also in most cases be considered as the intersection of closed shapes.
- FindChildOption
TODO
Member
Value
Description
FindChildrenRecursively TODO
TODO
FindDirectChildrenOnly TODO
TODO
- FocusPolicy
This enum type defines the various policies a widget can have with respect to acquiring keyboard focus.
Member
Value
Description
ClickFocus 0x2
the widget accepts focus by clicking.
NoFocus 0
the widget does not accept focus.
StrongFocus TabFocus | ClickFocus | 0x8
the widget accepts focus by both tabbing and clicking. On macOS this will also be indicate that the widget accepts tab focus when in ‘Text/List focus mode’.
TabFocus 0x1
the widget accepts focus by tabbing.
WheelFocus StrongFocus | 0x4
like plus the widget accepts focus by using the mouse wheel.
- FocusReason
This enum specifies why the focus changed. It will be passed through setFocus() and can be retrieved in the QFocusEvent sent to the widget upon focus change.
See also
Member
Value
Description
ActiveWindowFocusReason 3
The window system made this window either active or inactive.
BacktabFocusReason 2
A Backtab occurred. The input for this may include the Shift or Control keys; e.g. Shift Tab.
MenuBarFocusReason 6
The menu bar took focus.
MouseFocusReason 0
A mouse action occurred.
NoFocusReason TODO
TODO
OtherFocusReason 7
Another reason, usually application-specific.
PopupFocusReason 4
The application opened/closed a pop-up that grabbed/released the keyboard focus.
ShortcutFocusReason 5
The user typed a label’s buddy shortcut
TabFocusReason 1
The Tab key was pressed.
- GestureFlag
This enum type describes additional flags that can be used when subscribing to a gesture.
See also
Member
Value
Description
DontStartGestureOnChildren 0x01
By default gestures can start on the widget or over any of its children. Use this flag to disable this and allow a gesture to start on the widget only.
IgnoredGesturesPropagateToParent 0x04
Since Qt 4.7, this flag allows you to fine-tune gesture event propagation. By setting the flag when grabbing a gesture all ignored partial gestures will propagate to their parent items.
ReceivePartialGestures 0x02
Allows any ignored gesture events to be propagated to parent widgets which have specified this hint. By default only gestures that are in the GestureStarted state are propagated and the widget always gets the full gesture sequence starting with a gesture in the GestureStarted state and ending with a gesture in the GestureFinished or GestureCanceled states.
- GestureState
This enum type describes the state of a gesture.
See also
Member
Value
Description
GestureCanceled 4
A gesture was canceled.
GestureFinished 3
A gesture has finished.
GestureStarted 1
A continuous gesture has started.
GestureUpdated 2
A gesture continues.
- GestureType
This enum type describes the standard gestures.
User-defined gestures are registered with the QGestureRecognizer::registerRecognizer() function which generates a custom gesture ID with the flag set.
See also
Member
Value
Description
CustomGesture 0x0100
A flag that can be used to test if the gesture is a user-defined gesture ID.
PanGesture 3
A Pan gesture.
PinchGesture 4
A Pinch gesture.
SwipeGesture 5
A Swipe gesture.
TapAndHoldGesture 2
A Tap-And-Hold (Long-Tap) gesture.
TapGesture 1
A Tap gesture.
- GlobalColor
Qt’s predefined QColor objects:
See also
Member
Value
Description
black 2
Black (#000000)
blue 9
Blue (#0000ff)
color0 0
0 pixel value (for bitmaps)
color1 1
1 pixel value (for bitmaps)
cyan 10
Cyan (#00ffff)
darkBlue 15
Dark blue (#000080)
darkCyan 16
Dark cyan (#008080)
darkGray 4
Dark gray (#808080)
darkGreen 14
Dark green (#008000)
darkMagenta 17
Dark magenta (#800080)
darkRed 13
Dark red (#800000)
darkYellow 18
Dark yellow (#808000)
gray 5
Gray (#a0a0a4)
green 8
Green (#00ff00)
lightGray 6
Light gray (#c0c0c0)
magenta 11
Magenta (#ff00ff)
red 7
Red (#ff0000)
transparent 19
a transparent black value (i.e., QColor(0, 0, 0, 0))
white 3
White (#ffffff)
yellow 12
Yellow (#ffff00)
- HighDpiScaleFactorRoundingPolicy
TODO
Member
Value
Description
Ceil TODO
TODO
Floor TODO
TODO
PassThrough TODO
TODO
Round TODO
TODO
RoundPreferFloor TODO
TODO
- HitTestAccuracy
TODO
Member
Value
Description
ExactHit TODO
TODO
FuzzyHit TODO
TODO
- ImageConversionFlag
The options marked “(default)” are set if no other values from the list are included (since the defaults are zero):
Color/Mono preference (ignored for QBitmap):
Dithering mode preference:
Dithering mode preference for 1-bit alpha masks:
Color matching versus dithering preference:
Member
Value
Description
AutoColor 0x00000000
(default) - If the image has depth 1 and contains only black and white pixels, the pixmap becomes monochrome.
AutoDither 0x00000000
(default) - Only dither when down-converting to 1 or 8-bit indexed formats.
AvoidDither 0x00000080
Only dither to indexed formats if the source image uses more different colors than the size of the color table of the destination format.
ColorOnly 0x00000003
The pixmap is dithered/converted to the defaultDepth().
DiffuseAlphaDither 0x00000008
A high-quality dither using error diffusion.
DiffuseDither 0x00000000
(default) - A high-quality dither using error diffusion.
MonoOnly 0x00000002
The pixmap becomes monochrome. If necessary, it is dithered using the chosen dithering algorithm.
NoFormatConversion 0x00000200
Don’t do any format conversions on the image. Can be useful when converting a QImage to a QPixmap for a one-time rendering operation for example. Note that a QPixmap not in the preferred format will be much slower as a paint device.
NoOpaqueDetection 0x00000100
Do not check whether the image contains non-opaque pixels. Use this if you know that the image is semi-transparent and you want to avoid the overhead of checking the pixels in the image until a non-opaque pixel is found, or if you want the pixmap to retain an alpha channel for some other reason. If the image has no alpha channel this flag has no effect.
OrderedAlphaDither 0x00000004
A faster, ordered dither.
OrderedDither 0x00000010
A faster, ordered dither.
PreferDither 0x00000040
Always dither images when converting to smaller color-spaces.
ThresholdAlphaDither 0x00000000
(default) - No dithering.
ThresholdDither 0x00000020
No dithering; closest color is used.
- InputMethodHint
Flags that alter the behavior:
Flags that restrict input (exclusive flags):
Masks:
Note: If several exclusive flags are OR-ed together, the resulting character set will consist of the union of the specified sets. For instance specifying
ImhNumbersOnly
andImhUppercaseOnly
would yield a set consisting of numbers and uppercase letters.See also
Member
Value
Description
ImhDate TODO
The text editor functions as a date field.
ImhDialableCharactersOnly 0x100000
Only characters suitable for phone dialing are allowed.
ImhDigitsOnly 0x10000
Only digits are allowed.
ImhEmailCharactersOnly 0x200000
Only characters suitable for email addresses are allowed.
ImhExclusiveInputMask 0xffff0000
This mask yields nonzero if any of the exclusive flags are used.
ImhFormattedNumbersOnly 0x20000
Only number input is allowed. This includes decimal point and minus sign.
ImhHiddenText 0x1
The input method should not show the characters while typing. This is automatically set when setting QLineEdit::echoMode to
Password
. Note that settingImhHiddenText
does not change the echo mode.ImhLatinOnly TODO
Only latin based input is allowed.
ImhLowercaseOnly 0x80000
Only lower case letter input is allowed.
ImhMultiLine TODO
Multiple lines can be entered into the text field.
ImhNoAutoUppercase 0x2
The input method should not try to automatically switch to upper case when a sentence ends.
ImhNoEditMenu TODO
Do not use built-in edit menu. This flag was introduced in Qt 5.11.
ImhNone 0x0
No hints.
ImhNoPredictiveText 0x20
Do not use predictive text (i.e. dictionary lookup) while typing.
ImhNoTextHandles TODO
Do not use built-in text cursor and selection handles. This flag was introduced in Qt 5.11.
ImhPreferLatin TODO
Latin characters are preferred (but not required).
ImhPreferLowercase 0x10
Lower case letters are preferred (but not required).
ImhPreferNumbers 0x4
Numbers are preferred (but not required).
ImhPreferUppercase 0x8
Upper case letters are preferred (but not required).
ImhSensitiveData TODO
Typed text should not be stored by the active input method in any persistent storage like predictive user dictionary.
ImhTime TODO
The text editor functions as a time field.
ImhUppercaseOnly 0x40000
Only upper case letter input is allowed.
ImhUrlCharactersOnly 0x400000
Only characters suitable for URLs are allowed.
- InputMethodQuery
Masks:
See also
Member
Value
Description
ImAbsolutePosition TODO
The logical position of the cursor within the entire document.
ImAnchorPosition 6
The position of the selection anchor. This may be less or greater than
ImCursorPosition
, depending on which side of selection the cursor is. If there is no selection, it returns the same asImCursorPosition
.ImAnchorRectangle TODO
The bounding rectangle of the selection anchor. This value was added in Qt 5.7.
ImCurrentSelection 4
The currently selected text.
ImCursorPosition 2
The logical position of the cursor within the text surrounding the input area (see
ImSurroundingText
).ImCursorRectangle TODO
The rectangle covering the area of the input cursor in widget coordinates.
ImEnabled TODO
The widget accepts input method input.
ImEnterKeyType TODO
The Enter key type.
ImFont 1
The currently used font for text input.
ImHints TODO
The hints for input method on expected input. (See Qt::InputMethodHints)
ImInputItemClipRectangle TODO
The actual exposed input item rectangle. Parts of the input item might be clipped. This value will take clipping into consideration and return the actual painted item rectangle. The rectangle is in widget coordinates.
ImMaximumTextLength 5
The maximum number of characters that the widget can hold. If there is no limit, __init__() is returned.
ImMicroFocus 0
This query is obsolete. Use
ImCursorRectangle
instead.ImPlatformData TODO
Platform specific data for input method.
ImPreferredLanguage TODO
The preferred input language.
ImQueryAll TODO
Query for all input method properties.
ImQueryInput TODO
Commonly changed properties on input.
ImSurroundingText 3
The plain text around the input area, for example the current paragraph.
ImTextAfterCursor TODO
The plain text after the cursor. The widget can decide how much text to return, but must not return an empty string unless the cursor is at the end of the document.
ImTextBeforeCursor TODO
The plain text before the cursor. The widget can decide how much text to return, but must not return an empty string unless the cursor is at the start of the document.
- ItemDataRole
Each item in the model has a set of data elements associated with it, each with its own role. The roles are used by the view to indicate to the model which type of data it needs. Custom models should return data in these types.
The general purpose roles (and the associated types) are:
Roles describing appearance and meta data (with associated types):
Accessibility roles (with associated types):
User roles:
For user roles, it is up to the developer to decide which types to use and ensure that components use the correct types when accessing and setting data.
Member
Value
Description
AccessibleDescriptionRole 12
A description of the item for accessibility purposes. (QString)
AccessibleTextRole 11
The text to be used by accessibility extensions and plugins, such as screen readers. (QString)
BackgroundColorRole 8
This role is obsolete. Use instead.
BackgroundRole 8
The background brush used for items rendered with the default delegate. (QBrush)
CheckStateRole 10
This role is used to obtain the checked state of an item. (CheckState)
DecorationRole 1
The data to be rendered as a decoration in the form of an icon. (QColor, QIcon or QPixmap)
DisplayRole 0
The key data to be rendered in the form of text. (QString)
EditRole 2
The data in a form suitable for editing in an editor. (QString)
FontRole 6
The font used for items rendered with the default delegate. (QFont)
ForegroundRole 9
The foreground brush (text color, typically) used for items rendered with the default delegate. (QBrush)
InitialSortOrderRole 14
This role is used to obtain the initial sort order of a header view section. (SortOrder). This role was introduced in Qt 4.8.
SizeHintRole 13
The size hint for the item that will be supplied to views. (QSize)
StatusTipRole 4
The data displayed in the status bar. (QString)
TextAlignmentRole 7
The alignment of the text for items rendered with the default delegate. (Qt::Alignment)
TextColorRole 9
This role is obsolete. Use instead.
ToolTipRole 3
The data displayed in the item’s tooltip. (QString)
UserRole 32
The first role that can be used for application-specific purposes.
WhatsThisRole 5
The data displayed for the item in “What’s This?” mode. (QString)
- ItemFlag
This enum describes the properties of an item:
Note that checkable items need to be given both a suitable set of flags and an initial state, indicating whether the item is checked or not. This is handled automatically for model/view components, but needs to be explicitly set for instances of QListWidgetItem, QTableWidgetItem, and QTreeWidgetItem.
Note that it is undefined behavior to reimplement hasChildren() to return true for an index if that index has the Qt::ItemNeverHasChildren flag set.
See also
Member
Value
Description
ItemIsAutoTristate TODO
The item’s state depends on the state of its children. This enables automatic management of the state of parent items in QTreeWidget (checked if all children are checked, unchecked if all children are unchecked, or partially checked if only some children are checked).
ItemIsDragEnabled 4
It can be dragged.
ItemIsDropEnabled 8
It can be used as a drop target.
ItemIsEditable 2
It can be edited.
ItemIsEnabled 32
The user can interact with the item.
ItemIsSelectable 1
It can be selected.
ItemIsTristate 64
This enum value is deprecated. Use Qt::ItemIsAutoTristate instead.
ItemIsUserCheckable 16
It can be checked or unchecked by the user.
ItemIsUserTristate TODO
The user can cycle through three separate states. This value was added in Qt 5.5.
ItemNeverHasChildren TODO
The item never has child items. This is used for optimization purposes only.
NoItemFlags 0
It does not have any properties set.
- ItemSelectionMode
This enum is used in QGraphicsItem, QGraphicsScene and QGraphicsView to specify how items are selected, or how to determine if shapes and items collide.
See also
QGraphicsScene::items()QGraphicsScene::collidingItems()QGraphicsView::items()QGraphicsItem::collidesWithItem()QGraphicsItem::collidesWithPath().
Member
Value
Description
ContainsItemBoundingRect 0x2
The output list contains only items whose bounding rectangle is fully contained inside the selection area. Items that intersect with the area’s outline are not included.
ContainsItemShape 0x0
The output list contains only items whose shape is fully contained inside the selection area. Items that intersect with the area’s outline are not included.
IntersectsItemBoundingRect 0x3
The output list contains both items whose bounding rectangle is fully contained inside the selection area, and items that intersect with the area’s outline. This method is commonly used for determining areas that need redrawing.
IntersectsItemShape 0x1
The output list contains both items whose shape is fully contained inside the selection area, and items that intersect with the area’s outline. This is a common mode for rubber band selection.
- ItemSelectionOperation
TODO
Member
Value
Description
AddToSelection TODO
TODO
ReplaceSelection TODO
TODO
- Key
The key names used by Qt.
See also
Member
Value
Description
Key_0 TODO
TODO
Key_1 TODO
TODO
Key_2 TODO
TODO
Key_3 TODO
TODO
Key_4 TODO
TODO
Key_5 TODO
TODO
Key_6 TODO
TODO
Key_7 TODO
TODO
Key_8 TODO
TODO
Key_9 TODO
TODO
Key_A TODO
TODO
Key_Aacute TODO
TODO
Key_Acircumflex TODO
TODO
Key_acute TODO
TODO
Key_AddFavorite TODO
TODO
Key_Adiaeresis TODO
TODO
Key_AE TODO
TODO
Key_Agrave TODO
TODO
Key_Alt TODO
TODO
Key_AltGr 0x01001103
On Windows, when the KeyDown event for this key is sent, the Ctrl Alt modifiers are also set.
Key_Ampersand TODO
TODO
Key_Any TODO
TODO
Key_Apostrophe TODO
TODO
Key_ApplicationLeft TODO
TODO
Key_ApplicationRight TODO
TODO
Key_Aring TODO
TODO
Key_AsciiCircum TODO
TODO
Key_AsciiTilde TODO
TODO
Key_Asterisk TODO
TODO
Key_At TODO
TODO
Key_Atilde TODO
TODO
Key_AudioCycleTrack TODO
TODO
Key_AudioForward TODO
TODO
Key_AudioRandomPlay TODO
TODO
Key_AudioRepeat TODO
TODO
Key_AudioRewind TODO
TODO
Key_Away TODO
TODO
Key_B TODO
TODO
Key_Back TODO
TODO
Key_BackForward TODO
TODO
Key_Backslash TODO
TODO
Key_Backspace TODO
TODO
Key_Backtab TODO
TODO
Key_Bar TODO
TODO
Key_BassBoost TODO
TODO
Key_BassDown TODO
TODO
Key_BassUp TODO
TODO
Key_Battery TODO
TODO
Key_Blue TODO
TODO
Key_Bluetooth TODO
TODO
Key_Book TODO
TODO
Key_BraceLeft TODO
TODO
Key_BraceRight TODO
TODO
Key_BracketLeft TODO
TODO
Key_BracketRight TODO
TODO
Key_BrightnessAdjust TODO
TODO
Key_brokenbar TODO
TODO
Key_C TODO
TODO
Key_Calculator 0x010000cb
On X11 this key is not mapped for legacy reasons. Use instead.
Key_Calendar TODO
TODO
Key_Call 0x01100004
A key to answer or initiate a call (see for a key to toggle current call state)
Key_Camera 0x01100020
A key to activate the camera shutter. On Windows Runtime, the environment variable QT_QPA_ENABLE_CAMERA_KEYS must be set to receive the event.
Key_CameraFocus 0x01100021
A key to focus the camera. On Windows Runtime, the environment variable QT_QPA_ENABLE_CAMERA_KEYS must be set to receive the event.
Key_Cancel TODO
TODO
Key_CapsLock TODO
TODO
Key_Ccedilla TODO
TODO
Key_CD TODO
TODO
Key_cedilla TODO
TODO
Key_cent TODO
TODO
Key_ChannelDown TODO
TODO
Key_ChannelUp TODO
TODO
Key_Clear 0x0100000b
Corresponds to the Clear key on selected Apple keyboard models. On other systems it is commonly mapped to the numeric keypad key 5, when Num Lock is
off
.Key_ClearGrab TODO
TODO
Key_Close TODO
TODO
Key_Codeinput TODO
TODO
Key_Colon TODO
TODO
Key_Comma TODO
TODO
Key_Community TODO
TODO
Key_Context1 TODO
TODO
Key_Context2 TODO
TODO
Key_Context3 TODO
TODO
Key_Context4 TODO
TODO
Key_ContrastAdjust TODO
TODO
Key_Control 0x01000021
On macOS, this corresponds to the Command keys.
Key_Copy TODO
TODO
Key_copyright TODO
TODO
Key_currency TODO
TODO
Key_Cut TODO
TODO
Key_D TODO
TODO
Key_Dead_a TODO
TODO
Key_Dead_A TODO
TODO
Key_Dead_Abovecomma TODO
TODO
Key_Dead_Abovedot TODO
TODO
Key_Dead_Abovereversedcomma TODO
TODO
Key_Dead_Abovering TODO
TODO
Key_Dead_Aboveverticalline TODO
TODO
Key_Dead_Acute TODO
TODO
Key_Dead_Belowbreve TODO
TODO
Key_Dead_Belowcircumflex TODO
TODO
Key_Dead_Belowcomma TODO
TODO
Key_Dead_Belowdiaeresis TODO
TODO
Key_Dead_Belowdot TODO
TODO
Key_Dead_Belowmacron TODO
TODO
Key_Dead_Belowring TODO
TODO
Key_Dead_Belowtilde TODO
TODO
Key_Dead_Belowverticalline TODO
TODO
Key_Dead_Breve TODO
TODO
Key_Dead_Capital_Schwa TODO
TODO
Key_Dead_Caron TODO
TODO
Key_Dead_Cedilla TODO
TODO
Key_Dead_Circumflex TODO
TODO
Key_Dead_Currency TODO
TODO
Key_Dead_Diaeresis TODO
TODO
Key_Dead_Doubleacute TODO
TODO
Key_Dead_Doublegrave TODO
TODO
Key_Dead_e TODO
TODO
Key_Dead_E TODO
TODO
Key_Dead_Grave TODO
TODO
Key_Dead_Greek TODO
TODO
Key_Dead_Hook TODO
TODO
Key_Dead_Horn TODO
TODO
Key_Dead_i TODO
TODO
Key_Dead_I TODO
TODO
Key_Dead_Invertedbreve TODO
TODO
Key_Dead_Iota TODO
TODO
Key_Dead_Longsolidusoverlay TODO
TODO
Key_Dead_Lowline TODO
TODO
Key_Dead_Macron TODO
TODO
Key_Dead_o TODO
TODO
Key_Dead_O TODO
TODO
Key_Dead_Ogonek TODO
TODO
Key_Dead_Semivoiced_Sound TODO
TODO
Key_Dead_Small_Schwa TODO
TODO
Key_Dead_Stroke TODO
TODO
Key_Dead_Tilde TODO
TODO
Key_Dead_u TODO
TODO
Key_Dead_U TODO
TODO
Key_Dead_Voiced_Sound TODO
TODO
Key_degree TODO
TODO
Key_Delete TODO
TODO
Key_diaeresis TODO
TODO
Key_Direction_L TODO
TODO
Key_Direction_R TODO
TODO
Key_Display TODO
TODO
Key_division TODO
TODO
Key_Documents TODO
TODO
Key_Dollar TODO
TODO
Key_DOS TODO
TODO
Key_Down TODO
TODO
Key_E TODO
TODO
Key_Eacute TODO
TODO
Key_Ecircumflex TODO
TODO
Key_Ediaeresis TODO
TODO
Key_Egrave TODO
TODO
Key_Eisu_Shift TODO
TODO
Key_Eisu_toggle TODO
TODO
Key_Eject TODO
TODO
Key_End TODO
TODO
Key_Enter 0x01000005
Typically located on the keypad.
Key_Equal TODO
TODO
Key_Escape TODO
TODO
Key_ETH TODO
TODO
Key_Excel TODO
TODO
Key_Exclam TODO
TODO
Key_exclamdown TODO
TODO
Key_Execute TODO
TODO
Key_Exit TODO
TODO
Key_Explorer TODO
TODO
Key_F TODO
TODO
Key_F1 TODO
TODO
Key_F10 TODO
TODO
Key_F11 TODO
TODO
Key_F12 TODO
TODO
Key_F13 TODO
TODO
Key_F14 TODO
TODO
Key_F15 TODO
TODO
Key_F16 TODO
TODO
Key_F17 TODO
TODO
Key_F18 TODO
TODO
Key_F19 TODO
TODO
Key_F2 TODO
TODO
Key_F20 TODO
TODO
Key_F21 TODO
TODO
Key_F22 TODO
TODO
Key_F23 TODO
TODO
Key_F24 TODO
TODO
Key_F25 TODO
TODO
Key_F26 TODO
TODO
Key_F27 TODO
TODO
Key_F28 TODO
TODO
Key_F29 TODO
TODO
Key_F3 TODO
TODO
Key_F30 TODO
TODO
Key_F31 TODO
TODO
Key_F32 TODO
TODO
Key_F33 TODO
TODO
Key_F34 TODO
TODO
Key_F35 TODO
TODO
Key_F4 TODO
TODO
Key_F5 TODO
TODO
Key_F6 TODO
TODO
Key_F7 TODO
TODO
Key_F8 TODO
TODO
Key_F9 TODO
TODO
Key_Favorites TODO
TODO
Key_Finance TODO
TODO
Key_Find TODO
TODO
Key_Flip TODO
TODO
Key_Forward TODO
TODO
Key_G TODO
TODO
Key_Game TODO
TODO
Key_Go TODO
TODO
Key_Greater TODO
TODO
Key_Green TODO
TODO
Key_Guide TODO
TODO
Key_guillemotleft TODO
TODO
Key_guillemotright TODO
TODO
Key_H TODO
TODO
Key_Hangul TODO
TODO
Key_Hangul_Banja TODO
TODO
Key_Hangul_End TODO
TODO
Key_Hangul_Hanja TODO
TODO
Key_Hangul_Jamo TODO
TODO
Key_Hangul_Jeonja TODO
TODO
Key_Hangul_PostHanja TODO
TODO
Key_Hangul_PreHanja TODO
TODO
Key_Hangul_Romaja TODO
TODO
Key_Hangul_Special TODO
TODO
Key_Hangul_Start TODO
TODO
Key_Hangup 0x01100005
A key to end an ongoing call (see for a key to toggle current call state)
Key_Hankaku TODO
TODO
Key_Help TODO
TODO
Key_Henkan TODO
TODO
Key_Hibernate TODO
TODO
Key_Hiragana TODO
TODO
Key_Hiragana_Katakana TODO
TODO
Key_History TODO
TODO
Key_Home TODO
TODO
Key_HomePage TODO
TODO
Key_HotLinks TODO
TODO
Key_Hyper_L TODO
TODO
Key_Hyper_R TODO
TODO
Key_hyphen TODO
TODO
Key_I TODO
TODO
Key_Iacute TODO
TODO
Key_Icircumflex TODO
TODO
Key_Idiaeresis TODO
TODO
Key_Igrave TODO
TODO
Key_Info TODO
TODO
Key_Insert TODO
TODO
Key_iTouch TODO
TODO
Key_J TODO
TODO
Key_K TODO
TODO
Key_Kana_Lock TODO
TODO
Key_Kana_Shift TODO
TODO
Key_Kanji TODO
TODO
Key_Katakana TODO
TODO
Key_KeyboardBrightnessDown TODO
TODO
Key_KeyboardBrightnessUp TODO
TODO
Key_KeyboardLightOnOff TODO
TODO
Key_L TODO
TODO
Key_LastNumberRedial TODO
TODO
Key_Launch0 0x010000a2
On X11 this key is mapped to “My Computer” (XF86XK_MyComputer) key for legacy reasons.
Key_Launch1 0x010000a3
On X11 this key is mapped to “Calculator” (XF86XK_Calculator) key for legacy reasons.
Key_Launch2 0x010000a4
On X11 this key is mapped to XF86XK_Launch0 key for legacy reasons.
Key_Launch3 0x010000a5
On X11 this key is mapped to XF86XK_Launch1 key for legacy reasons.
Key_Launch4 0x010000a6
On X11 this key is mapped to XF86XK_Launch2 key for legacy reasons.
Key_Launch5 0x010000a7
On X11 this key is mapped to XF86XK_Launch3 key for legacy reasons.
Key_Launch6 0x010000a8
On X11 this key is mapped to XF86XK_Launch4 key for legacy reasons.
Key_Launch7 0x010000a9
On X11 this key is mapped to XF86XK_Launch5 key for legacy reasons.
Key_Launch8 0x010000aa
On X11 this key is mapped to XF86XK_Launch6 key for legacy reasons.
Key_Launch9 0x010000ab
On X11 this key is mapped to XF86XK_Launch7 key for legacy reasons.
Key_LaunchA 0x010000ac
On X11 this key is mapped to XF86XK_Launch8 key for legacy reasons.
Key_LaunchB 0x010000ad
On X11 this key is mapped to XF86XK_Launch9 key for legacy reasons.
Key_LaunchC 0x010000ae
On X11 this key is mapped to XF86XK_LaunchA key for legacy reasons.
Key_LaunchD 0x010000af
On X11 this key is mapped to XF86XK_LaunchB key for legacy reasons.
Key_LaunchE 0x010000b0
On X11 this key is mapped to XF86XK_LaunchC key for legacy reasons.
Key_LaunchF 0x010000b1
On X11 this key is mapped to XF86XK_LaunchD key for legacy reasons.
Key_LaunchG 0x0100010e
On X11 this key is mapped to XF86XK_LaunchE key for legacy reasons.
Key_LaunchH 0x0100010f
On X11 this key is mapped to XF86XK_LaunchF key for legacy reasons.
Key_LaunchMail TODO
TODO
Key_LaunchMedia TODO
TODO
Key_Left TODO
TODO
Key_Less TODO
TODO
Key_LightBulb TODO
TODO
Key_LogOff TODO
TODO
Key_M TODO
TODO
Key_macron TODO
TODO
Key_MailForward TODO
TODO
Key_Market TODO
TODO
Key_masculine TODO
TODO
Key_Massyo TODO
TODO
Key_MediaLast TODO
TODO
Key_MediaNext TODO
TODO
Key_MediaPause 0x1000085
A key setting the state of the media player to pause (Note: not the pause/break key)
Key_MediaPlay 0x01000080
A key setting the state of the media player to play
Key_MediaPrevious TODO
TODO
Key_MediaRecord TODO
TODO
Key_MediaStop 0x01000081
A key setting the state of the media player to stop
Key_MediaTogglePlayPause 0x1000086
A key to toggle the play/pause state in the media player (rather than setting an absolute state)
Key_Meeting TODO
TODO
Key_Memo TODO
TODO
Key_Menu TODO
TODO
Key_MenuKB TODO
TODO
Key_MenuPB TODO
TODO
Key_Messenger TODO
TODO
Key_Meta 0x01000022
On macOS, this corresponds to the Control keys. On Windows keyboards, this key is mapped to the Windows key.
Key_MicMute TODO
TODO
Key_MicVolumeDown TODO
TODO
Key_MicVolumeUp TODO
TODO
Key_Minus TODO
TODO
Key_Mode_switch TODO
TODO
Key_MonBrightnessDown TODO
TODO
Key_MonBrightnessUp TODO
TODO
Key_mu TODO
TODO
Key_Muhenkan TODO
TODO
Key_Multi_key TODO
TODO
Key_MultipleCandidate TODO
TODO
Key_multiply TODO
TODO
Key_Music TODO
TODO
Key_MySites TODO
TODO
Key_N TODO
TODO
Key_New TODO
TODO
Key_News TODO
TODO
Key_No TODO
TODO
Key_nobreakspace TODO
TODO
Key_notsign TODO
TODO
Key_Ntilde TODO
TODO
Key_NumberSign TODO
TODO
Key_NumLock TODO
TODO
Key_O TODO
TODO
Key_Oacute TODO
TODO
Key_Ocircumflex TODO
TODO
Key_Odiaeresis TODO
TODO
Key_OfficeHome TODO
TODO
Key_Ograve TODO
TODO
Key_onehalf TODO
TODO
Key_onequarter TODO
TODO
Key_onesuperior TODO
TODO
Key_Ooblique TODO
TODO
Key_Open TODO
TODO
Key_OpenUrl TODO
TODO
Key_Option TODO
TODO
Key_ordfeminine TODO
TODO
Key_Otilde TODO
TODO
Key_P TODO
TODO
Key_PageDown TODO
TODO
Key_PageUp TODO
TODO
Key_paragraph TODO
TODO
Key_ParenLeft TODO
TODO
Key_ParenRight TODO
TODO
Key_Paste TODO
TODO
Key_Pause 0x01000008
The Pause/Break key (Note: Not related to pausing media)
Key_Percent TODO
TODO
Key_Period TODO
TODO
Key_periodcentered TODO
TODO
Key_Phone TODO
TODO
Key_Pictures TODO
TODO
Key_Play TODO
TODO
Key_Plus TODO
TODO
Key_plusminus TODO
TODO
Key_PowerDown TODO
TODO
Key_PowerOff TODO
TODO
Key_PreviousCandidate TODO
TODO
Key_Print TODO
TODO
Key_Printer TODO
TODO
Key_Q TODO
TODO
Key_Question TODO
TODO
Key_questiondown TODO
TODO
Key_QuoteDbl TODO
TODO
Key_QuoteLeft TODO
TODO
Key_R TODO
TODO
Key_Red TODO
TODO
Key_Redo TODO
TODO
Key_Refresh TODO
TODO
Key_registered TODO
TODO
Key_Reload TODO
TODO
Key_Reply TODO
TODO
Key_Return TODO
TODO
Key_Right TODO
TODO
Key_Romaji TODO
TODO
Key_RotateWindows TODO
TODO
Key_RotationKB TODO
TODO
Key_RotationPB TODO
TODO
Key_S TODO
TODO
Key_Save TODO
TODO
Key_ScreenSaver TODO
TODO
Key_ScrollLock TODO
TODO
Key_Search TODO
TODO
Key_section TODO
TODO
Key_Select TODO
TODO
Key_Semicolon TODO
TODO
Key_Send TODO
TODO
Key_Settings TODO
TODO
Key_Shift TODO
TODO
Key_Shop TODO
TODO
Key_SingleCandidate TODO
TODO
Key_Slash TODO
TODO
Key_Sleep TODO
TODO
Key_Space TODO
TODO
Key_Spell TODO
TODO
Key_SplitScreen TODO
TODO
Key_ssharp TODO
TODO
Key_Standby TODO
TODO
Key_sterling TODO
TODO
Key_Stop TODO
TODO
Key_Subtitle TODO
TODO
Key_Super_L TODO
TODO
Key_Super_R TODO
TODO
Key_Support TODO
TODO
Key_Suspend TODO
TODO
Key_SysReq TODO
TODO
Key_T TODO
TODO
Key_Tab TODO
TODO
Key_TaskPane TODO
TODO
Key_Terminal TODO
TODO
Key_THORN TODO
TODO
Key_threequarters TODO
TODO
Key_threesuperior TODO
TODO
Key_Time TODO
TODO
Key_ToDoList TODO
TODO
Key_ToggleCallHangup 0x01100007
A key to toggle the current call state (ie. either answer, or hangup) depending on current call state
Key_Tools TODO
TODO
Key_TopMenu TODO
TODO
Key_TouchpadOff TODO
TODO
Key_TouchpadOn TODO
TODO
Key_TouchpadToggle TODO
TODO
Key_Touroku TODO
TODO
Key_Travel TODO
TODO
Key_TrebleDown TODO
TODO
Key_TrebleUp TODO
TODO
Key_twosuperior TODO
TODO
Key_U TODO
TODO
Key_Uacute TODO
TODO
Key_Ucircumflex TODO
TODO
Key_Udiaeresis TODO
TODO
Key_Ugrave TODO
TODO
Key_Underscore TODO
TODO
Key_Undo TODO
TODO
Key_unknown TODO
TODO
Key_Up TODO
TODO
Key_UWB TODO
TODO
Key_V TODO
TODO
Key_Video TODO
TODO
Key_View TODO
TODO
Key_VoiceDial TODO
TODO
Key_VolumeDown TODO
TODO
Key_VolumeMute TODO
TODO
Key_VolumeUp TODO
TODO
Key_W TODO
TODO
Key_WakeUp TODO
TODO
Key_WebCam TODO
TODO
Key_WLAN TODO
TODO
Key_Word TODO
TODO
Key_WWW TODO
TODO
Key_X TODO
TODO
Key_Xfer TODO
TODO
Key_Y TODO
TODO
Key_Yacute TODO
TODO
Key_ydiaeresis TODO
TODO
Key_Yellow TODO
TODO
Key_yen TODO
TODO
Key_Yes TODO
TODO
Key_Z TODO
TODO
Key_Zenkaku TODO
TODO
Key_Zenkaku_Hankaku TODO
TODO
Key_Zoom TODO
TODO
Key_ZoomIn TODO
TODO
Key_ZoomOut TODO
TODO
- KeyboardModifier
This enum describes the modifier keys.
Note: On macOS, the
ControlModifier
value corresponds to the Command keys on the keyboard, and theMetaModifier
value corresponds to the Control keys. TheKeypadModifier
value will also be set when an arrow key is pressed as the arrow keys are considered part of the keypad.Note: On Windows Keyboards, and Key_Meta are mapped to the Windows key.
See also
MouseButton, Modifier.
Member
Value
Description
AltModifier 0x08000000
An Alt key on the keyboard is pressed.
ControlModifier 0x04000000
A Ctrl key on the keyboard is pressed.
GroupSwitchModifier 0x40000000
X11 only (unless activated on Windows by a command line argument). A Mode_switch key on the keyboard is pressed.
KeyboardModifierMask TODO
TODO
KeypadModifier 0x20000000
A keypad button is pressed.
MetaModifier 0x10000000
A Meta key on the keyboard is pressed.
NoModifier 0x00000000
No modifier key is pressed.
ShiftModifier 0x02000000
A Shift key on the keyboard is pressed.
- LayoutDirection
Specifies the direction of Qt’s layouts and text handling.
Right-to-left layouts are necessary for certain languages, notably Arabic and Hebrew.
serves two purposes. When used in conjunction with widgets and layouts, it will imply to use the layout direction set on the parent widget or QApplication. This has the same effect as unsetLayoutDirection().
When is used in conjunction with text layouting, it will imply that the text directionality is determined from the content of the string to be layouted.
Member
Value
Description
LayoutDirectionAuto 2
Automatic layout.
LeftToRight 0
Left-to-right layout.
RightToLeft 1
Right-to-left layout.
- MaskMode
This enum specifies the behavior of the createMaskFromColor() and QImage::createMaskFromColor() functions.
Member
Value
Description
MaskInColor 0
Creates a mask where all pixels matching the given color are opaque.
MaskOutColor 1
Creates a mask where all pixels matching the given color are transparent.
- MatchFlag
This enum describes the type of matches that can be used when searching for items in a model.
See also
QRegExp, QString::compare().
Member
Value
Description
MatchCaseSensitive 16
The search is case sensitive.
MatchContains 1
The search term is contained in the item.
MatchEndsWith 3
The search term matches the end of the item.
MatchExactly 0
Performs QVariant-based matching.
MatchFixedString 8
Performs string-based matching. String-based comparisons are case-insensitive unless the
MatchCaseSensitive
flag is also specified.MatchRecursive 64
Searches the entire hierarchy.
MatchRegExp 4
Performs string-based matching using a regular expression as the search term.
MatchRegularExpression TODO
TODO
MatchStartsWith 2
The search term matches the start of the item.
MatchWildcard 5
Performs string-based matching using a string with wildcards as the search term.
MatchWrap 32
Perform a search that wraps around, so that when the search reaches the last item in the model, it begins again at the first item and continues until all items have been examined.
- Modifier
This enum provides shorter names for the keyboard modifier keys supported by Qt.
Note: On macOS, the
CTRL
value corresponds to the Command keys on the keyboard, and theMETA
value corresponds to the Control keys.See also
KeyboardModifier, MouseButton.
Member
Value
Description
ALT Qt::AltModifier
The normal Alt keys, but not keys like AltGr.
CTRL Qt::ControlModifier
The Ctrl keys.
META Qt::MetaModifier
The Meta keys.
MODIFIER_MASK TODO
TODO
SHIFT Qt::ShiftModifier
The Shift keys provided on all standard keyboards.
UNICODE_ACCEL 0x00000000
The shortcut is specified as a Unicode code point, not as a Qt Key.
- MouseButton
This enum type describes the different mouse buttons.
Note: Some models of multi-button mice are pre-configured with high-numbered Buttons emulating keyboard sequences, for use in specific games. In order for these Buttons to be seen as actual ‘Mouse Buttons’, the device must be re-configured (using the vendor’s configuration tool).
See also
KeyboardModifier, Modifier.
Member
Value
Description
AllButtons TODO
This value corresponds to a mask of all possible mouse buttons. Use to set the ‘acceptedButtons’ property of a MouseArea to accept ALL mouse buttons.
BackButton TODO
The ‘Back’ button. (Typically present on the ‘thumb’ side of a mouse with extra buttons. This is NOT the tilt wheel.)
ExtraButton1 TODO
The ‘Back’ Button.
ExtraButton10 TODO
The 13th non-wheel Mouse Button.
ExtraButton11 TODO
The 14th non-wheel Mouse Button.
ExtraButton12 TODO
The 15th non-wheel Mouse Button.
ExtraButton13 TODO
The 16th non-wheel Mouse Button.
ExtraButton14 TODO
The 17th non-wheel Mouse Button.
ExtraButton15 TODO
The 18th non-wheel Mouse Button.
ExtraButton16 TODO
The 19th non-wheel Mouse Button.
ExtraButton17 TODO
The 20th non-wheel Mouse Button.
ExtraButton18 TODO
The 21st non-wheel Mouse Button.
ExtraButton19 TODO
The 22nd non-wheel Mouse Button.
ExtraButton2 TODO
The ‘Forward’ Button.
ExtraButton20 TODO
The 23rd non-wheel Mouse Button.
ExtraButton21 TODO
The 24th non-wheel Mouse Button.
ExtraButton22 TODO
The 25th non-wheel Mouse Button.
ExtraButton23 TODO
The 26th non-wheel Mouse Button.
ExtraButton24 TODO
The 27th non-wheel Mouse Button.
ExtraButton3 TODO
The ‘Task’ Button.
ExtraButton4 TODO
The 7th non-wheel Mouse Button.
ExtraButton5 TODO
The 8th non-wheel Mouse Button.
ExtraButton6 TODO
The 9th non-wheel Mouse Button.
ExtraButton7 TODO
The 10th non-wheel Mouse Button.
ExtraButton8 TODO
The 11th non-wheel Mouse Button.
ExtraButton9 TODO
The 12th non-wheel Mouse Button.
ForwardButton TODO
The ‘Forward’ Button. (Typically present beside the ‘Back’ button, and also pressed by the thumb.)
LeftButton 0x00000001
The left button is pressed, or an event refers to the left button. (The left button may be the right button on left-handed mice.)
MidButton 0x00000004
The middle button.
MiddleButton MidButton
The middle button.
NoButton 0x00000000
The button state does not refer to any button (see button()).
RightButton 0x00000002
The right button.
TaskButton TODO
The ‘Task’ Button.
XButton1 0x00000008
The ‘Back’ Button.
XButton2 0x00000010
The ‘Forward Button.
- MouseEventFlag
TODO
Member
Value
Description
MouseEventCreatedDoubleClick TODO
TODO
- MouseEventSource
TODO
Member
Value
Description
MouseEventNotSynthesized TODO
TODO
MouseEventSynthesizedByApplication TODO
TODO
MouseEventSynthesizedByQt TODO
TODO
MouseEventSynthesizedBySystem TODO
TODO
- NativeGestureType
TODO
Member
Value
Description
BeginNativeGesture TODO
TODO
EndNativeGesture TODO
TODO
PanNativeGesture TODO
TODO
RotateNativeGesture TODO
TODO
SmartZoomNativeGesture TODO
TODO
SwipeNativeGesture TODO
TODO
ZoomNativeGesture TODO
TODO
This enum type describes the mode for moving focus.
Note: Cursor navigation is not currently implemented on any platform and behaves as .
See also
QApplication::setNavigationMode()QApplication::navigationMode().
Member
Value
Description
NavigationModeCursorAuto 3
The mouse cursor is used to change focus, it is displayed only on non touchscreen devices. The keypad is used to implement a virtual cursor, unless the device has an analog mouse type of input device (e.g. touchpad). This is the recommended setting for an application such as a web browser that needs pointer control on both touch and non-touch devices.
NavigationModeCursorForceVisible 4
The mouse cursor is used to change focus, it is displayed regardless of device type. The keypad is used to implement a virtual cursor, unless the device has an analog mouse type of input device (e.g. touchpad)
NavigationModeKeypadDirectional 2
Key_Up, Key_Down, Key_Left and Key_Right are used to change focus.
NavigationModeKeypadTabOrder 1
NavigationModeNone 0
Only the touch screen is used.
- Orientation
This type is used to signify an object’s orientation.
Orientation is used with QScrollBar for example.
Member
Value
Description
Horizontal TODO
TODO
Vertical TODO
TODO
- PenCapStyle
This enum type defines the pen cap styles supported by Qt, i.e. the line end caps that can be drawn using QPainter.
See also
QPen.
Member
Value
Description
FlatCap 0x00
a square line end that does not cover the end point of the line.
MPenCapStyle TODO
TODO
RoundCap 0x20
a rounded line end.
SquareCap 0x10
a square line end that covers the end point and extends beyond it by half the line width.
- PenJoinStyle
This enum type defines the pen join styles supported by Qt, i.e. which joins between two connected lines can be drawn using QPainter.
See also
QPen.
Member
Value
Description
BevelJoin 0x40
The triangular notch between the two lines is filled.
MiterJoin 0x00
The outer edges of the lines are extended to meet at an angle, and this area is filled.
MPenJoinStyle TODO
TODO
RoundJoin 0x80
A circular arc between the two lines is filled.
SvgMiterJoin 0x100
A miter join corresponding to the definition of a miter join in the SVG 1.2 Tiny specification.
- PenStyle
This enum type defines the pen styles that can be drawn using QPainter. The styles are:
See also
QPen.
Member
Value
Description
CustomDashLine 6
A custom pattern defined using setDashPattern().
DashDotDotLine 5
One dash, two dots, one dash, two dots.
DashDotLine 4
Alternate dots and dashes.
DashLine 2
Dashes separated by a few pixels.
DotLine 3
Dots separated by a few pixels.
MPenStyle TODO
TODO
NoPen 0
no line at all. For example, drawRect() fills but does not draw any boundary line.
SolidLine 1
A plain line.
- ScreenOrientation
TODO
Member
Value
Description
InvertedLandscapeOrientation TODO
TODO
InvertedPortraitOrientation TODO
TODO
LandscapeOrientation TODO
TODO
PortraitOrientation TODO
TODO
PrimaryOrientation TODO
TODO
- ScrollBarPolicy
This enum type describes the various modes of QAbstractScrollArea’s scroll bars.
(The modes for the horizontal and vertical scroll bars are independent.)
Member
Value
Description
ScrollBarAlwaysOff 1
QAbstractScrollArea never shows a scroll bar.
ScrollBarAlwaysOn 2
QAbstractScrollArea always shows a scroll bar. This property is ignored on systems with transient scroll bars (e.g., on Mac from version 10.7).
ScrollBarAsNeeded 0
QAbstractScrollArea shows a scroll bar when the content is too large to fit and not otherwise. This is the default.
- ScrollPhase
TODO
Member
Value
Description
NoScrollPhase TODO
TODO
ScrollBegin TODO
TODO
ScrollEnd TODO
TODO
ScrollMomentum TODO
TODO
ScrollUpdate TODO
TODO
- ShortcutContext
For a Shortcut event to occur, the shortcut’s key sequence must be entered by the user in a context where the shortcut is active. The possible contexts are these:
Member
Value
Description
ApplicationShortcut 2
The shortcut is active when one of the applications windows are active.
WidgetShortcut 0
The shortcut is active when its parent widget has focus.
WidgetWithChildrenShortcut 3
The shortcut is active when its parent widget, or any of its children has focus. Children which are top-level widgets, except pop-ups, are not affected by this shortcut context.
WindowShortcut 1
The shortcut is active when its parent widget is a logical subwidget of the active top-level window.
- SizeHint
This enum is used by QGraphicsLayoutItem::sizeHint()
See also
Member
Value
Description
MaximumSize 2
is used to specify the maximum size of a graphics layout item.
MinimumDescent 3
is used to specify the minimum descent of a text string in a graphics layout item.
MinimumSize 0
is used to specify the minimum size of a graphics layout item.
PreferredSize 1
is used to specify the preferred size of a graphics layout item.
- SizeMode
This enum is used by drawRoundedRect() and QPainterPath::addRoundedRect() functions to specify the radii of rectangle corners with respect to the dimensions of the bounding rectangles specified.
Member
Value
Description
AbsoluteSize 0
Specifies the size using absolute measurements.
RelativeSize 1
Specifies the size relative to the bounding rectangle, typically using percentage measurements.
- SortOrder
This enum describes how the items in a widget are sorted.
Member
Value
Description
AscendingOrder 0
The items are sorted ascending e.g. starts with ‘AAA’ ends with ‘ZZZ’ in Latin-1 locales
DescendingOrder 1
The items are sorted descending e.g. starts with ‘ZZZ’ ends with ‘AAA’ in Latin-1 locales
- TabFocusBehavior
TODO
Member
Value
Description
NoTabFocus TODO
TODO
TabFocusAllControls TODO
TODO
TabFocusListControls TODO
TODO
TabFocusTextControls TODO
TODO
- TextElideMode
This enum specifies where the ellipsis should appear when displaying texts that don’t fit:
is normally the most appropriate choice for URLs (e.g., “http://bugreports.qt…/QTWEBSITE-13/”), whereas is appropriate for other strings (e.g., “Deploying Applications on Ma…”).
See also
elidedText(), AlignmentFlag, textElideMode().
Member
Value
Description
ElideLeft 0
The ellipsis should appear at the beginning of the text.
ElideMiddle 2
The ellipsis should appear in the middle of the text.
ElideNone 3
Ellipsis should NOT appear in the text.
ElideRight 1
The ellipsis should appear at the end of the text.
- TextFlag
This enum type is used to define some modifier flags. Some of these flags only make sense in the context of printing:
You can use as many modifier flags as you want, except that and cannot be combined.
Flags that are inappropriate for a given use are generally ignored.
Member
Value
Description
TextDontClip 0x0200
If it’s impossible to stay within the given bounds, it prints outside.
TextDontPrint 0x4000
Treat this text as “hidden” and don’t print it.
TextExpandTabs 0x0400
Makes the U 0009 (ASCII tab) character move to the next tab stop.
TextHideMnemonic 0x8000
Same as but doesn’t draw the underlines.
TextIncludeTrailingSpaces 0x08000000
When this option is set, naturalTextWidth() and naturalTextRect() will return a value that includes the width of trailing spaces in the text; otherwise this width is excluded.
TextJustificationForced 0x10000
Ensures that text lines are justified.
TextShowMnemonic 0x0800
Displays the string “&P” as For an ampersand, use “&&”.
TextSingleLine 0x0100
Treats all whitespace as spaces and prints just one line.
TextWordWrap 0x1000
Breaks lines at appropriate points, e.g. at word boundaries.
TextWrapAnywhere 0x2000
Breaks lines anywhere, even within words.
- TextFormat
This enum is used in widgets that can display both plain text and rich text, for example QLabel. It is used for deciding whether a text string should be interpreted as one or the other. This is normally done by passing one of the enum values to a QTextEdit::setTextFormat() function.
Member
Value
Description
AutoText 2
The text string is interpreted as for if Qt::mightBeRichText() returns
true
, otherwise as .MarkdownText TODO
TODO
PlainText 0
The text string is interpreted as a plain text string.
RichText 1
The text string is interpreted as a rich text string. See Supported HTML Subset for the definition of rich text.
- TextInteractionFlag
This enum specifies how a text displaying widget reacts to user input.
Member
Value
Description
LinksAccessibleByKeyboard 8
Links can be focused using tab and activated with enter.
LinksAccessibleByMouse 4
Links can be highlighted and activated with the mouse.
NoTextInteraction 0
No interaction with the text is possible.
TextBrowserInteraction TextSelectableByMouse | LinksAccessibleByMouse | LinksAccessibleByKeyboard
The default for QTextBrowser.
TextEditable 16
The text is fully editable.
TextEditorInteraction TextSelectableByMouse | TextSelectableByKeyboard | TextEditable
The default for a text editor.
TextSelectableByKeyboard 2
Text can be selected with the cursor keys on the keyboard. A text cursor is shown.
TextSelectableByMouse 1
Text can be selected with the mouse and copied to the clipboard using a context menu or standard keyboard shortcuts.
- TileRule
This enum describes how to repeat or stretch the parts of an image when drawing.
Member
Value
Description
RepeatTile 1
Repeat the image until there is no more space. May crop the last image.
RoundTile 2
Similar to Repeat, but scales the image down to ensure that the last tile is not cropped.
StretchTile 0
Scale the image to fit to the available area.
- TimerType
TODO
Member
Value
Description
CoarseTimer TODO
TODO
PreciseTimer TODO
TODO
VeryCoarseTimer TODO
TODO
- TimeSpec
Member
Value
Description
LocalTime 0
Locale dependent time (Timezones and Daylight Savings Time).
OffsetFromUTC 2
An offset in seconds from Coordinated Universal Time.
TimeZone TODO
A named time zone using a specific set of Daylight Savings rules.
UTC 1
Coordinated Universal Time, replaces Greenwich Mean Time.
- ToolBarArea
Member
Value
Description
AllToolBarAreas TODO
TODO
BottomToolBarArea TODO
TODO
LeftToolBarArea TODO
TODO
NoToolBarArea TODO
TODO
RightToolBarArea TODO
TODO
ToolBarArea_Mask TODO
TODO
TopToolBarArea TODO
TODO
- ToolButtonStyle
The style of the tool button, describing how the button’s text and icon should be displayed.
Member
Value
Description
ToolButtonFollowStyle 4
Follow the style.
ToolButtonIconOnly 0
Only display the icon.
ToolButtonTextBesideIcon 2
The text appears beside the icon.
ToolButtonTextOnly 1
Only display the text.
ToolButtonTextUnderIcon 3
The text appears under the icon.
- TouchPointState
This enum represents the state of a touch point at the time a QTouchEvent occurred.
Member
Value
Description
TouchPointMoved 0x02
The touch point moved.
TouchPointPressed 0x01
The touch point is now pressed.
TouchPointReleased 0x08
The touch point was released.
TouchPointStationary 0x04
The touch point did not move.
- TransformationMode
This enum type defines whether image transformations (e.g., scaling) should be smooth or not.
See also
Member
Value
Description
FastTransformation 0
The transformation is performed quickly, with no smoothing.
SmoothTransformation 1
The resulting image is transformed using bilinear filtering.
- UIEffect
This enum describes the available UI effects.
By default, Qt will try to use the platform specific desktop settings for each effect. Use the QApplication::setDesktopSettingsAware() function (passing
false
as argument) to prevent this, and the QApplication::setEffectEnabled() to enable or disable a particular effect.Note that all effects are disabled on screens running at less than 16-bit color depth.
See also
Member
Value
Description
UI_AnimateCombo 3
Show animated comboboxes.
UI_AnimateMenu 1
Show animated menus.
UI_AnimateToolBox 6
Reserved
UI_AnimateTooltip 4
Show tooltip animations.
UI_FadeMenu 2
Show faded menus.
UI_FadeTooltip 5
Show tooltip fading effects.
UI_General TODO
TODO
- WhiteSpaceMode
TODO
Member
Value
Description
WhiteSpaceModeUndefined TODO
TODO
WhiteSpaceNormal TODO
TODO
WhiteSpaceNoWrap TODO
TODO
WhiteSpacePre TODO
TODO
- WidgetAttribute
This enum type is used to specify various widget attributes. Attributes are set and cleared with setAttribute(), and queried with testAttribute(), although some have special convenience functions which are mentioned below.
Member
Value
Description
WA_AcceptDrops 78
Allows data from drag and drop operations to be dropped onto the widget (see setAcceptDrops()).
WA_AcceptTouchEvents 121
Allows touch events (see QTouchEvent) to be sent to the widget. Must be set on all widgets that can handle touch events. Without this attribute set, events from a touch device will be sent as mouse events.
WA_AlwaysShowToolTips 84
Enables tooltips for inactive windows.
WA_AlwaysStackOnTop TODO
Since Qt 5.4, this value 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 underneath. It is strongly recommended to call update() on the widget’s top-level window after enabling or disabling this attribute.
WA_AttributeCount TODO
TODO
WA_ContentsMarginsRespectsSafeArea TODO
TODO
WA_CustomWhatsThis 47
Indicates that the widget wants to continue operating normally in “What’s This?” mode. This is set by the widget’s author.
WA_DeleteOnClose 55
Makes Qt delete this widget when the widget has accepted the close event (see closeEvent()).
WA_Disabled 0
Indicates that the widget is disabled, i.e. it does not receive any mouse or keyboard events. There is also a getter functions isEnabled(). This is set/cleared by the Qt kernel.
WA_DontCreateNativeAncestors 101
Indicates that the widget’s ancestors are kept non-native even though the widget itself is native.
WA_DontShowOnScreen 103
Indicates that the widget is hidden or is not a part of the viewable Desktop.
WA_ForceDisabled 32
Indicates that the widget is explicitly disabled, i.e. it will remain disabled even when all its ancestors are set to the enabled state. This implies . This is set/cleared by setEnabled() and setDisabled().
WA_ForceUpdatesDisabled 59
Indicates that updates are explicitly disabled for the widget; i.e. it will remain disabled even when all its ancestors are set to the updates-enabled state. This implies . This is set/cleared by setUpdatesEnabled().
WA_GrabbedShortcut TODO
TODO
WA_GroupLeader 72
This attribute has been deprecated. Use windowModality() instead.
WA_Hover 74
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 Styles example for details.
WA_InputMethodEnabled 14
Enables input methods for Asian languages. Must be set when creating custom text editing widgets.
WA_InputMethodTransparent TODO
TODO
WA_InvalidSize TODO
TODO
WA_KeyboardFocusChange 77
Set on a toplevel window when the users changes focus with the keyboard (tab, backtab, or shortcut).
WA_KeyCompression 33
Enables key event compression if set, and disables it if not set. By default key compression is off, so widgets receive one key press event for each key press (or more, since autorepeat is usually on). If you turn it on and your program doesn’t keep up with key input, Qt may try to compress key events so that more than one character can be processed in each event. For example, a word processor widget might receive 2, 3 or more characters in each text(), if the layout recalculation takes too long for the CPU. If a widget supports multiple character unicode input, it is always safe to turn the compression on. Qt performs key event compression only for printable characters. Modifier keys, cursor movement keys, function keys and miscellaneous action keys (e.g. Escape, Enter, Backspace, PrintScreen) will stop key event compression, even if there are more compressible key events available. Platforms other than Mac and X11 do not support this compression, in which case turning it on will have no effect. This is set/cleared by the widget’s author.
WA_LaidOut TODO
TODO
WA_LayoutOnEntireRect 48
Indicates that the widget wants QLayout to operate on the entire rect(), not only on contentsRect(). This is set by the widget’s author.
WA_LayoutUsesWidgetRect 92
Ignore the layout item rect from the style when laying out this widget with QLayout.
WA_MacAlwaysShowToolWindow 96
On macOS, show the tool window even when the application is not active. By default, all tool windows are hidden when the application is inactive.
WA_MacBrushedMetal 46
This value is obsolete and has no effect.
WA_MacFrameworkScaled 117
This value is obsolete and has no effect.
WA_MacMetalStyle TODO
TODO
WA_MacMiniSize 91
Indicates the widget should have the mini size for widgets in macOS. This attribute is only applicable to macOS.
WA_MacNoClickThrough 12
This value is obsolete and has no effect.
WA_MacNormalSize 89
Indicates the widget should have the normal size for widgets in macOS. This attribute is only applicable to macOS.
WA_MacNoShadow TODO
TODO
WA_MacOpaqueSizeGrip 85
Indicates that the native Carbon size grip should be opaque instead of transparent (the default). This attribute is only applicable to macOS and is set by the widget’s author.
WA_MacShowFocusRect 88
Indicates that this widget should get a QFocusFrame around it. Some widgets draw their own focus halo regardless of this attribute. Not that the focusPolicy() also plays the main role in whether something is given focus or not, this only controls whether or not this gets the focus frame. This attribute is only applicable to macOS.
WA_MacSmallSize 90
Indicates the widget should have the small size for widgets in macOS. This attribute is only applicable to macOS.
WA_MacVariableSize 102
Indicates the widget can choose between alternative sizes for widgets to avoid clipping. This attribute is only applicable to macOS.
WA_Mapped 11
Indicates that the widget is mapped on screen. This is set/cleared by the Qt kernel.
WA_MouseNoMask 71
Makes the widget receive mouse events for the entire widget regardless of the currently set mask, overriding setMask(). This is not applicable for top-level windows.
WA_MouseTracking 2
Indicates that the widget has mouse tracking enabled. See QWidget::mouseTracking.
WA_Moved 43
Indicates that the widget has an explicit position. This is set/cleared by move() and by setGeometry().
WA_MSWindowsUseDirect3D 94
This value is obsolete and has no effect.
WA_NativeWindow 100
Indicates that a native window is created for the widget. Enabling this flag will also force a native window for the widget’s ancestors unless is set.
WA_NoChildEventsForParent 58
Indicates that the widget does not want ChildAdded or ChildRemoved events sent to its parent. This is rarely necessary but can help to avoid automatic insertion widgets like splitters and layouts. This is set by a widget’s author.
WA_NoChildEventsFromChildren 39
Indicates that the widget does not want to receive ChildAdded or ChildRemoved events sent from its children. This is set by a widget’s author.
WA_NoMousePropagation 73
Prohibits mouse events from being propagated to the widget’s parent. This attribute is disabled by default.
WA_NoMouseReplay 54
Used for pop-up widgets. Indicates that the most recent mouse press event should not be replayed when the pop-up widget closes. The flag is set by the widget’s author and cleared by the Qt kernel every time the widget receives a new mouse event.
WA_NoSystemBackground 9
Indicates that the widget has no background, i.e. when the widget receives paint events, the background is not automatically repainted. Note: Unlike , newly exposed areas are never filled with the background (e.g., after showing a window for the first time the user can see “through” it until the application processes the paint events). This flag is set or cleared by the widget’s author.
WA_NoX11EventCompression TODO
TODO
WA_OpaquePaintEvent 4
Indicates that the widget paints all its pixels when it receives a paint event. Thus, it is not required for operations like updating, resizing, scrolling and focus changes to erase the widget before generating paint events. The use of provides a small optimization by helping to reduce flicker on systems that do not support double buffering and avoiding computational cycles necessary to erase the background prior to painting. Note: Unlike , makes an effort to avoid transparent window backgrounds. This flag is set or cleared by the widget’s author.
WA_OutsideWSRange 49
Indicates that the widget is outside the valid range of the window system’s coordinate system. A widget outside the valid range cannot be mapped on screen. This is set/cleared by the Qt kernel.
WA_PaintOnScreen 8
Indicates that the widget wants to draw directly onto the screen. Widgets with this attribute set do not participate in composition management, i.e. they cannot be semi-transparent or shine through semi-transparent overlapping widgets. Note: This flag is only supported on X11 and it disables double buffering. On Qt for Embedded Linux, the flag only works when set on a top-level widget and it relies on support from the active screen driver. This flag is set or cleared by the widget’s author. To render outside of Qt’s paint system, e.g., if you require native painting primitives, you need to reimplement paintEngine() to return 0 and set this flag.
WA_PaintUnclipped 52
Makes all painters operating on this widget unclipped. Children of this widget or other widgets in front of it do not clip the area the painter can paint on. This flag is only supported for widgets with the flag set. The preferred way to do this in a cross platform way is to create a transparent widget that lies in front of the other widgets.
WA_PendingMoveEvent 34
Indicates that a move event is pending, e.g., when a hidden widget was moved. This flag is set or cleared by the Qt kernel.
WA_PendingResizeEvent 35
Indicates that a resize event is pending, e.g., when a hidden widget was resized. This flag is set or cleared by the Qt kernel.
WA_PendingUpdate TODO
TODO
WA_QuitOnClose 76
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 Window.
WA_Resized 42
Indicates that the widget has an explicit size. This flag is set or cleared by resize() and setGeometry().
WA_RightToLeft 56
Indicates that the layout direction for the widget is right to left.
WA_SetCursor 38
Indicates that the widget has a cursor of its own. This flag is set or cleared by setCursor() and unsetCursor().
WA_SetFont 37
Indicates that the widget has a font of its own. This flag is set or cleared by setFont().
WA_SetLayoutDirection TODO
TODO
WA_SetLocale 87
Indicates the locale should be taken into consideration in the widget.
WA_SetPalette 36
Indicates that the widget has a palette of its own. This flag is set or cleared by setPalette().
WA_SetStyle 86
Indicates that the widget has a style of its own. This flag is set or cleared by setStyle().
WA_SetWindowIcon TODO
TODO
WA_ShowWithoutActivating 98
Show the widget without making it active.
WA_StaticContents 5
Indicates that the widget contents are north-west aligned and static. On resize, such a widget will receive paint events only for parts of itself that are newly visible. This flag is set or cleared by the widget’s author.
WA_StyledBackground 93
Indicates the widget should be drawn using a styled background.
WA_StyleSheet 97
Indicates that the widget is styled using a style sheet. is set whenever a widget is subject to a style sheet, even if the style sheet did not affect the widget appearance.
WA_StyleSheetTarget TODO
Indicates that the widget appearance was modified by a style sheet. will also be set.
WA_TabletTracking TODO
Indicates that the widget has tablet tracking enabled. See QWidget::tabletTracking.
WA_TintedBackground TODO
TODO
WA_TouchPadAcceptSingleTouchEvents 123
Allows touchpad single touch events to be sent to the widget.
WA_TranslucentBackground 120
Indicates that the widget should have a translucent background, i.e., any non-opaque regions of the widgets will be translucent because the widget will have an alpha channel. Setting this flag causes to be set. On Windows the widget also needs the FramelessWindowHint window flag to be set. This flag is set or cleared by the widget’s author.
WA_TransparentForMouseEvents 51
When enabled, this attribute disables the delivery of mouse events to the widget and its children. Mouse events are delivered to other widgets as if the widget and its children were not present in the widget hierarchy; mouse clicks and other events effectively “pass through” them. This attribute is disabled by default.
WA_UnderMouse 1
Indicates that the widget is under the mouse cursor. The value is not updated correctly during drag and drop operations. There is also a getter function, underMouse(). This flag is set or cleared by the Qt kernel.
WA_UpdatesDisabled 10
Indicates that updates are blocked (including the system background). This flag is set or cleared by the Qt kernel. Warning: This flag must never be set or cleared by the widget’s author.
WA_WindowModified 41
Indicates that the window is marked as modified. On some platforms this flag will do nothing, on others (including macOS and Windows) the window will take a modified appearance. This flag is set or cleared by setWindowModified().
WA_WindowPropagation 80
Makes a toplevel window inherit font, palette and locale from its parent.
WA_WState_CompressKeys TODO
TODO
WA_WState_ConfigPending TODO
TODO
WA_WState_Created TODO
TODO
WA_WState_ExplicitShowHide TODO
TODO
WA_WState_Hidden TODO
TODO
WA_WState_InPaintEvent TODO
TODO
WA_WState_OwnSizePolicy TODO
TODO
WA_WState_Polished TODO
TODO
WA_WState_Reparented TODO
TODO
WA_WState_Visible TODO
TODO
WA_X11DoNotAcceptFocus 132
Asks the window manager to not give focus to this top level window. This attribute has no effect on non-X11 platforms.
WA_X11NetWmWindowTypeCombo 115
Adds _NET_WM_WINDOW_TYPE_COMBO to the window’s _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for the QComboBox pop-up.
WA_X11NetWmWindowTypeDesktop 104
Adds _NET_WM_WINDOW_TYPE_DESKTOP to the window’s _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms.
WA_X11NetWmWindowTypeDialog 110
Adds _NET_WM_WINDOW_TYPE_DIALOG to the window’s _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for the Dialog and Sheet window types.
WA_X11NetWmWindowTypeDND 116
Adds _NET_WM_WINDOW_TYPE_DND to the window’s _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute on the feedback widget used during a drag.
WA_X11NetWmWindowTypeDock 105
Adds _NET_WM_WINDOW_TYPE_DOCK to the window’s _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms.
WA_X11NetWmWindowTypeDropDownMenu 111
Adds _NET_WM_WINDOW_TYPE_DROPDOWN_MENU to the window’s _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for QMenu objects added to a QMenuBar.
WA_X11NetWmWindowTypeMenu 107
Adds _NET_WM_WINDOW_TYPE_MENU to the window’s _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for QMenu when torn-off.
WA_X11NetWmWindowTypeNotification 114
Adds _NET_WM_WINDOW_TYPE_NOTIFICATION to the window’s _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms.
WA_X11NetWmWindowTypePopupMenu 112
Adds _NET_WM_WINDOW_TYPE_POPUP_MENU to the window’s _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for QMenu.
WA_X11NetWmWindowTypeSplash 109
Adds _NET_WM_WINDOW_TYPE_SPLASH to the window’s _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for the SplashScreen window type.
WA_X11NetWmWindowTypeToolBar 106
Adds _NET_WM_WINDOW_TYPE_TOOLBAR to the window’s _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for QToolBar.
WA_X11NetWmWindowTypeToolTip 113
Adds _NET_WM_WINDOW_TYPE_TOOLTIP to the window’s _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for the ToolTip window type.
WA_X11NetWmWindowTypeUtility 108
Adds _NET_WM_WINDOW_TYPE_UTILITY to the window’s _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for the Tool window type.
WA_X11OpenGLOverlay TODO
TODO
- WindowFrameSection
This enum is used to describe parts of a window frame. It is returned by QGraphicsWidget::windowFrameSectionAt() to describe what section of the window frame is under the mouse.
See also
QGraphicsWidget::windowFrameEvent()QGraphicsWidget::paintWindowFrame()QGraphicsWidget::windowFrameSectionAt().
Member
Value
Description
BottomLeftSection TODO
TODO
BottomRightSection TODO
TODO
BottomSection TODO
TODO
LeftSection TODO
TODO
NoSection TODO
TODO
RightSection TODO
TODO
TitleBarArea TODO
TODO
TopLeftSection TODO
TODO
TopRightSection TODO
TODO
TopSection TODO
TODO
- WindowModality
This enum specifies the behavior of a modal window. A modal window is one that blocks input to other windows. Note that windows that are children of a modal window are not blocked.
The values are:
See also
Member
Value
Description
ApplicationModal 2
The window is modal to the application and blocks input to all windows.
NonModal 0
The window is not modal and does not block input to other windows.
WindowModal 1
The window is modal to a single window hierarchy and blocks input to its parent window, all grandparent windows, and all siblings of its parent and grandparent windows.
- WindowState
This enum type is used to specify the current state of a top-level window.
The states are
Member
Value
Description
WindowActive 0x00000008
The window is the active window, i.e. it has keyboard focus.
WindowFullScreen 0x00000004
The window fills the entire screen without any frame around it.
WindowMaximized 0x00000002
The window is maximized with a frame around it.
WindowMinimized 0x00000001
The window is minimized (i.e. iconified).
WindowNoState 0x00000000
The window has no state set (in normal state).
- WindowType
This enum type is used to specify various window-system properties for the widget. They are fairly unusual but necessary in a few cases. Some of these flags depend on whether the underlying window manager supports them.
The main types are
There are also a number of flags which you can use to customize the appearance of top-level windows. These have no effect on other windows:
The
CustomizeWindowHint
flag is used to enable customization of the window controls. This flag must be set to allow theWindowTitleHint
,WindowSystemMenuHint
,WindowMinimizeButtonHint
,WindowMaximizeButtonHint
andWindowCloseButtonHint
flags to be changed.Note: On X11, this hint will work only in window managers that support _NET_WM_STATE_BELOW atom. If a window always on the bottom has a parent, the parent will also be left on the bottom. This window hint is currently not implemented for macOS.
Note: On Windows, this will work only for frameless or full-screen windows.
See also
Member
Value
Description
BypassGraphicsProxyWidget 0x20000000
Prevents the window and its children from automatically embedding themselves into a QGraphicsProxyWidget if the parent widget is already embedded. You can set this flag if you want your widget to always be a toplevel widget on the desktop, regardless of whether the parent widget is embedded in a scene or not.
BypassWindowManagerHint TODO
This flag can be used to indicate to the platform plugin that “all” window manager protocols should be disabled. This flag will behave different depending on what operating system the application is running on and what window manager is running. The flag can be used to get a native window with no configuration set.
CoverWindow TODO
Indicates that the window represents a cover window, which is shown when the application is minimized on some platforms.
CustomizeWindowHint 0x02000000
Turns off the default window title hints.
Desktop 0x00000010 | Window
Indicates that this widget is the desktop. This is the type for QDesktopWidget.
Dialog 0x00000002 | Window
Indicates that the widget is a window that should be decorated as a dialog (i.e., typically no maximize or minimize buttons in the title bar). This is the default type for QDialog. If you want to use it as a modal dialog, it should be launched from another window, or have a parent and used with the windowModality() property. If you make it modal, the dialog will prevent other top-level windows in the application from getting any input. We refer to a top-level window that has a parent as a secondary window.
Drawer 0x00000006 | Window
Indicates that the widget is a drawer on macOS.
ForeignWindow TODO
Indicates that this window object is a handle representing a native platform window created by another process or by manually using native code.
FramelessWindowHint 0x00000800
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 ability to understand Motif and/or NETWM hints. Most existing modern window managers can handle this.
MacWindowToolBarButtonHint 0x10000000
On macOS adds a tool bar button (i.e., the oblong button that is on the top right of windows that have toolbars).
MaximizeUsingFullscreenGeometryHint TODO
Informs the window system that when maximizing the window it should use as much of the available screen geometry as possible, including areas that may be covered by system UI such as status bars or application launchers. This may result in the window being placed under these system UIs, but does not guarantee it, depending on whether or not the platform supports it. When the flag is enabled the user is responsible for taking availableGeometry() into account, so that any UI elements in the application that require user interaction are not covered by system UI.
MSWindowsFixedSizeDialogHint 0x00000100
Gives the window a thin dialog border on Windows. This style is traditionally used for fixed-size dialogs.
MSWindowsOwnDC 0x00000200
Gives the window its own display context on Windows.
NoDropShadowWindowHint TODO
Disables window drop shadow on supporting platforms.
Popup 0x00000008 | Window
Indicates that the widget is a pop-up top-level window, i.e. that it is modal, but has a window system frame appropriate for pop-up menus.
Sheet 0x00000004 | Window
Indicates that the window is a sheet on macOS. Since using a sheet implies window modality, the recommended way is to use setWindowModality(), or QDialog::open(), instead.
SplashScreen 0x0000000e | Window
Indicates that the window is a splash screen. This is the default type for QSplashScreen.
SubWindow 0x00000012
Indicates that this widget is a sub-window, such as a QMdiSubWindow widget.
Tool 0x0000000a | Window
Indicates that the widget is a tool window. A tool window is often a small window with a smaller than usual title bar and decoration, typically used for collections of tool buttons. If there is a parent, the tool window will always be kept on top of it. If there isn’t a parent, you may consider using as well. If the window system supports it, a tool window can be decorated with a somewhat lighter frame. It can also be combined with . On macOS, tool windows correspond to the NSPanel class of windows. This means that the window lives on a level above normal windows making it impossible to put a normal window on top of it. By default, tool windows will disappear when the application is inactive. This can be controlled by the WA_MacAlwaysShowToolWindow attribute.
ToolTip 0x0000000c | Window
Indicates that the widget is a tooltip. This is used internally to implement toolTip().
Widget 0x00000000
This is the default type for QWidget. Widgets of this type are child widgets if they have a parent, and independent windows if they have no parent. See also and .
Window 0x00000001
Indicates that the widget is a window, usually with a window system frame and a title bar, irrespective of whether the widget has a parent or not. Note that it is not possible to unset this flag if the widget does not have a parent.
WindowCloseButtonHint 0x08000000
Adds a close button. On some platforms this implies for it to work.
WindowContextHelpButtonHint 0x00010000
Adds a context help button to dialogs. On some platforms this implies for it to work.
WindowDoesNotAcceptFocus TODO
Informs the window system that this window should not receive the input focus.
WindowFullscreenButtonHint TODO
On macOS adds a fullscreen button.
WindowMaximizeButtonHint 0x00008000
Adds a maximize button. On some platforms this implies for it to work.
WindowMinimizeButtonHint 0x00004000
Adds a minimize button. On some platforms this implies for it to work.
WindowMinMaxButtonsHint WindowMinimizeButtonHint | WindowMaximizeButtonHint
Adds a minimize and a maximize button. On some platforms this implies for it to work.
WindowOverridesSystemGestures TODO
Informs the window system that this window implements its own set of gestures and that system level gestures, like for instance three-finger desktop switching, should be disabled.
WindowShadeButtonHint 0x00020000
Adds a shade button in place of the minimize button if the underlying window manager supports it.
WindowStaysOnBottomHint 0x04000000
Informs the window system that the window should stay on bottom of all other windows.
WindowStaysOnTopHint 0x00040000
Informs the window system that the window should stay on top of all other windows. Note that on some window managers on X11 you also have to pass for this flag to work correctly.
WindowSystemMenuHint 0x00002000
Adds a window system menu, and possibly a close button (for example on Mac). If you need to hide or show a close button, it is more portable to use
WindowCloseButtonHint
.WindowTitleHint 0x00001000
Gives the window a title bar.
WindowTransparentForInput TODO
Informs the window system that this window is used only for output (displaying something) and does not take input. Therefore input events should pass through as if it wasn’t there.
WindowType_Mask 0x000000ff
A mask for extracting the window type part of the window flags.
X11BypassWindowManagerHint 0x00000400
Bypass the window manager completely. This results in a borderless window that is not managed at all (i.e., no keyboard input unless you call activateWindow() manually).