Qt 名称空间

Qt 名称空间包含整个 Qt 库所用的杂项标识符。 更多...

头: #include <Qt>
qmake: QT += core

类型

flags Alignment
enum AlignmentFlag { AlignLeft, AlignRight, AlignHCenter, AlignJustify, ..., AlignVertical_Mask }
enum AnchorPoint { AnchorLeft, AnchorHorizontalCenter, AnchorRight, AnchorTop, AnchorVerticalCenter, AnchorBottom }
enum ApplicationAttribute { AA_DontShowIconsInMenus, AA_DontShowShortcutsInContextMenus, AA_NativeWindows, AA_DontCreateNativeWidgetSiblings, ..., AA_X11InitThreads }
enum ApplicationState { ApplicationSuspended, ApplicationHidden, ApplicationInactive, ApplicationActive }
flags ApplicationStates
enum ArrowType { NoArrow, UpArrow, DownArrow, LeftArrow, RightArrow }
enum AspectRatioMode { IgnoreAspectRatio, KeepAspectRatio, KeepAspectRatioByExpanding }
enum Axis { XAxis, YAxis, ZAxis }
enum BGMode { TransparentMode, OpaqueMode }
enum BrushStyle { NoBrush, SolidPattern, Dense1Pattern, Dense2Pattern, ..., TexturePattern }
enum CaseSensitivity { CaseInsensitive, CaseSensitive }
enum CheckState { Unchecked, PartiallyChecked, Checked }
enum ChecksumType { ChecksumIso3309, ChecksumItuV41 }
enum ClipOperation { NoClip, ReplaceClip, IntersectClip }
enum ConnectionType { AutoConnection, DirectConnection, QueuedConnection, BlockingQueuedConnection, UniqueConnection }
enum ContextMenuPolicy { NoContextMenu, PreventContextMenu, DefaultContextMenu, ActionsContextMenu, CustomContextMenu }
enum CoordinateSystem { DeviceCoordinates, LogicalCoordinates }
enum Corner { TopLeftCorner, TopRightCorner, BottomLeftCorner, BottomRightCorner }
enum CursorMoveStyle { LogicalMoveStyle, VisualMoveStyle }
enum CursorShape { ArrowCursor, UpArrowCursor, CrossCursor, WaitCursor, ..., BitmapCursor }
enum DateFormat { TextDate, ISODate, ISODateWithMs, SystemLocaleShortDate, ..., RFC2822Date }
enum DayOfWeek { Monday, Tuesday, Wednesday, Thursday, ..., Sunday }
enum DockWidgetArea { LeftDockWidgetArea, RightDockWidgetArea, TopDockWidgetArea, BottomDockWidgetArea, AllDockWidgetAreas, NoDockWidgetArea }
flags DockWidgetAreas
enum DropAction { CopyAction, MoveAction, LinkAction, ActionMask, IgnoreAction, TargetMoveAction }
flags DropActions
enum Edge { TopEdge, LeftEdge, RightEdge, BottomEdge }
flags Edges
enum EnterKeyType { EnterKeyDefault, EnterKeyReturn, EnterKeyDone, EnterKeyGo, ..., EnterKeyPrevious }
enum EventPriority { HighEventPriority, NormalEventPriority, LowEventPriority }
enum FillRule { OddEvenFill, WindingFill }
enum FindChildOption { FindDirectChildrenOnly, FindChildrenRecursively }
flags FindChildOptions
enum FocusPolicy { TabFocus, ClickFocus, StrongFocus, WheelFocus, NoFocus }
enum FocusReason { MouseFocusReason, TabFocusReason, BacktabFocusReason, ActiveWindowFocusReason, ..., OtherFocusReason }
enum GestureFlag { DontStartGestureOnChildren, ReceivePartialGestures, IgnoredGesturesPropagateToParent }
flags GestureFlags
enum GestureState { NoGesture, GestureStarted, GestureUpdated, GestureFinished, GestureCanceled }
enum GestureType { TapGesture, TapAndHoldGesture, PanGesture, PinchGesture, SwipeGesture, CustomGesture }
enum GlobalColor { white, black, red, darkRed, ..., color1 }
typedef HANDLE
enum HitTestAccuracy { ExactHit, FuzzyHit }
enum ImageConversionFlag { AutoColor, ColorOnly, MonoOnly, DiffuseDither, ..., NoFormatConversion }
flags ImageConversionFlags
enum InputMethodHint { ImhNone, ImhHiddenText, ImhSensitiveData, ImhNoAutoUppercase, ..., ImhExclusiveInputMask }
flags InputMethodHints
flags InputMethodQueries
enum InputMethodQuery { ImEnabled, ImMicroFocus, ImCursorRectangle, ImFont, ..., ImQueryAll }
enum ItemDataRole { DisplayRole, DecorationRole, EditRole, ToolTipRole, ..., UserRole }
enum ItemFlag { NoItemFlags, ItemIsSelectable, ItemIsEditable, ItemIsDragEnabled, ..., ItemIsUserTristate }
flags ItemFlags
enum ItemSelectionMode { ContainsItemShape, IntersectsItemShape, ContainsItemBoundingRect, IntersectsItemBoundingRect }
enum ItemSelectionOperation { ReplaceSelection, AddToSelection }
enum Key { Key_Escape, Key_Tab, Key_Backtab, Key_Backspace, ..., Key_Cancel }
enum KeyboardModifier { NoModifier, ShiftModifier, ControlModifier, AltModifier, ..., GroupSwitchModifier }
flags KeyboardModifiers
enum LayoutDirection { LeftToRight, RightToLeft, LayoutDirectionAuto }
enum MaskMode { MaskInColor, MaskOutColor }
enum MatchFlag { MatchExactly, MatchFixedString, MatchContains, MatchStartsWith, ..., MatchRecursive }
flags MatchFlags
enum Modifier { SHIFT, META, CTRL, ALT, UNICODE_ACCEL }
enum MouseButton { NoButton, AllButtons, LeftButton, RightButton, ..., ExtraButton24 }
flags MouseButtons
enum MouseEventFlag { MouseEventCreatedDoubleClick }
flags MouseEventFlags
enum MouseEventSource { MouseEventNotSynthesized, MouseEventSynthesizedBySystem, MouseEventSynthesizedByQt, MouseEventSynthesizedByApplication }
enum NativeGestureType { BeginNativeGesture, EndNativeGesture, PanNativeGesture, ZoomNativeGesture, ..., SwipeNativeGesture }
enum NavigationMode { NavigationModeNone, NavigationModeKeypadTabOrder, NavigationModeKeypadDirectional, NavigationModeCursorAuto, NavigationModeCursorForceVisible }
enum Orientation { Horizontal, Vertical }
flags Orientations
enum PenCapStyle { FlatCap, SquareCap, RoundCap }
enum PenJoinStyle { MiterJoin, BevelJoin, RoundJoin, SvgMiterJoin }
enum PenStyle { NoPen, SolidLine, DashLine, DotLine, ..., CustomDashLine }
enum ScreenOrientation { PrimaryOrientation, LandscapeOrientation, PortraitOrientation, InvertedLandscapeOrientation, InvertedPortraitOrientation }
flags ScreenOrientations
enum ScrollBarPolicy { ScrollBarAsNeeded, ScrollBarAlwaysOff, ScrollBarAlwaysOn }
enum ScrollPhase { NoScrollPhase, ScrollBegin, ScrollUpdate, ScrollEnd, ScrollMomentum }
enum ShortcutContext { WidgetShortcut, WidgetWithChildrenShortcut, WindowShortcut, ApplicationShortcut }
enum SizeHint { MinimumSize, PreferredSize, MaximumSize, MinimumDescent }
enum SizeMode { AbsoluteSize, RelativeSize }
enum SortOrder { AscendingOrder, DescendingOrder }
enum TabFocusBehavior { NoTabFocus, TabFocusTextControls, TabFocusListControls, TabFocusAllControls }
enum TextElideMode { ElideLeft, ElideRight, ElideMiddle, ElideNone }
enum TextFlag { TextSingleLine, TextDontClip, TextExpandTabs, TextShowMnemonic, ..., TextJustificationForced }
enum TextFormat { PlainText, RichText, AutoText }
enum TextInteractionFlag { NoTextInteraction, TextSelectableByMouse, TextSelectableByKeyboard, LinksAccessibleByMouse, ..., TextBrowserInteraction }
flags TextInteractionFlags
enum TileRule { StretchTile, RepeatTile, RoundTile }
enum TimeSpec { LocalTime, UTC, OffsetFromUTC, TimeZone }
enum TimerType { PreciseTimer, CoarseTimer, VeryCoarseTimer }
enum ToolBarArea { LeftToolBarArea, RightToolBarArea, TopToolBarArea, BottomToolBarArea, AllToolBarAreas, NoToolBarArea }
flags ToolBarAreas
enum ToolButtonStyle { ToolButtonIconOnly, ToolButtonTextOnly, ToolButtonTextBesideIcon, ToolButtonTextUnderIcon, ToolButtonFollowStyle }
enum TouchPointState { TouchPointPressed, TouchPointMoved, TouchPointStationary, TouchPointReleased }
flags TouchPointStates
enum TransformationMode { FastTransformation, SmoothTransformation }
enum UIEffect { UI_AnimateMenu, UI_FadeMenu, UI_AnimateCombo, UI_AnimateTooltip, UI_FadeTooltip, UI_AnimateToolBox }
enum WhiteSpaceMode { WhiteSpaceNormal, WhiteSpacePre, WhiteSpaceNoWrap }
enum WidgetAttribute { WA_AcceptDrops, WA_AlwaysShowToolTips, WA_ContentsPropagated, WA_CustomWhatsThis, ..., WA_ContentsMarginsRespectsSafeArea }
flags WindowFlags
enum WindowFrameSection { NoSection, LeftSection, TopLeftSection, TopSection, ..., TitleBarArea }
enum WindowModality { NonModal, WindowModal, ApplicationModal }
enum WindowState { WindowNoState, WindowMinimized, WindowMaximized, WindowFullScreen, WindowActive }
flags WindowStates
enum WindowType { Widget, Window, Dialog, Sheet, ..., WindowType_Mask }

函数

convertFromPlainText (const QString & plain , Qt::WhiteSpaceMode mode )
mightBeRichText (const QString & text )
QFlags<KeyboardModifiers::enum_type> operator| (KeyboardModifiers::enum_type f1 , KeyboardModifiers::enum_type f2 )
QFlags<KeyboardModifiers::enum_type> operator| (KeyboardModifiers::enum_type f1 , QFlags<KeyboardModifiers::enum_type> f2 )
QFlags<InputMethodHints::enum_type> operator| (InputMethodHints::enum_type f1 , InputMethodHints::enum_type f2 )
QFlags<InputMethodHints::enum_type> operator| (InputMethodHints::enum_type f1 , QFlags<InputMethodHints::enum_type> f2 )
QIncompatibleFlag operator| (InputMethodHints::enum_type f1 , int f2 )
QFlags<DropActions::enum_type> operator| (DropActions::enum_type f1 , DropActions::enum_type f2 )
QFlags<DropActions::enum_type> operator| (DropActions::enum_type f1 , QFlags<DropActions::enum_type> f2 )
QIncompatibleFlag operator| (DropActions::enum_type f1 , int f2 )
QFlags<ItemFlags::enum_type> operator| (ItemFlags::enum_type f1 , ItemFlags::enum_type f2 )
QFlags<ItemFlags::enum_type> operator| (ItemFlags::enum_type f1 , QFlags<ItemFlags::enum_type> f2 )
QIncompatibleFlag operator| (ItemFlags::enum_type f1 , int f2 )
QFlags<MatchFlags::enum_type> operator| (MatchFlags::enum_type f1 , MatchFlags::enum_type f2 )
QFlags<MatchFlags::enum_type> operator| (MatchFlags::enum_type f1 , QFlags<MatchFlags::enum_type> f2 )
QIncompatibleFlag operator| (MatchFlags::enum_type f1 , int f2 )
QFlags<TextInteractionFlags::enum_type> operator| (TextInteractionFlags::enum_type f1 , TextInteractionFlags::enum_type f2 )
QFlags<TextInteractionFlags::enum_type> operator| (TextInteractionFlags::enum_type f1 , QFlags<TextInteractionFlags::enum_type> f2 )
QIncompatibleFlag operator| (TextInteractionFlags::enum_type f1 , int f2 )
QFlags<TouchPointStates::enum_type> operator| (TouchPointStates::enum_type f1 , TouchPointStates::enum_type f2 )
QFlags<TouchPointStates::enum_type> operator| (TouchPointStates::enum_type f1 , QFlags<TouchPointStates::enum_type> f2 )
QIncompatibleFlag operator| (TouchPointStates::enum_type f1 , int f2 )
QFlags<GestureFlags::enum_type> operator| (GestureFlags::enum_type f1 , GestureFlags::enum_type f2 )
QFlags<GestureFlags::enum_type> operator| (GestureFlags::enum_type f1 , QFlags<GestureFlags::enum_type> f2 )
QIncompatibleFlag operator| (GestureFlags::enum_type f1 , int f2 )
QFlags<MouseEventFlags::enum_type> operator| (MouseEventFlags::enum_type f1 , MouseEventFlags::enum_type f2 )
QFlags<MouseEventFlags::enum_type> operator| (MouseEventFlags::enum_type f1 , QFlags<MouseEventFlags::enum_type> f2 )
QIncompatibleFlag operator| (MouseEventFlags::enum_type f1 , int f2 )
int operator| ( int , int )
QIncompatibleFlag operator| (KeyboardModifiers::enum_type f1 , int f2 )
QFlags<MouseButtons::enum_type> operator| (MouseButtons::enum_type f1 , MouseButtons::enum_type f2 )
QFlags<MouseButtons::enum_type> operator| (MouseButtons::enum_type f1 , QFlags<MouseButtons::enum_type> f2 )
QIncompatibleFlag operator| (MouseButtons::enum_type f1 , int f2 )
QFlags<Orientations::enum_type> operator| (Orientations::enum_type f1 , Orientations::enum_type f2 )
QFlags<Orientations::enum_type> operator| (Orientations::enum_type f1 , QFlags<Orientations::enum_type> f2 )
QIncompatibleFlag operator| (Orientations::enum_type f1 , int f2 )
QFlags<Alignment::enum_type> operator| (Alignment::enum_type f1 , Alignment::enum_type f2 )
QFlags<Alignment::enum_type> operator| (Alignment::enum_type f1 , QFlags<Alignment::enum_type> f2 )
QIncompatibleFlag operator| (Alignment::enum_type f1 , int f2 )
QFlags<WindowFlags::enum_type> operator| (WindowFlags::enum_type f1 , WindowFlags::enum_type f2 )
QFlags<WindowFlags::enum_type> operator| (WindowFlags::enum_type f1 , QFlags<WindowFlags::enum_type> f2 )
QIncompatibleFlag operator| (WindowFlags::enum_type f1 , int f2 )
QFlags<WindowStates::enum_type> operator| (WindowStates::enum_type f1 , WindowStates::enum_type f2 )
QFlags<WindowStates::enum_type> operator| (WindowStates::enum_type f1 , QFlags<WindowStates::enum_type> f2 )
QIncompatibleFlag operator| (WindowStates::enum_type f1 , int f2 )
QFlags<ScreenOrientations::enum_type> operator| (ScreenOrientations::enum_type f1 , ScreenOrientations::enum_type f2 )
QFlags<ScreenOrientations::enum_type> operator| (ScreenOrientations::enum_type f1 , QFlags<ScreenOrientations::enum_type> f2 )
QIncompatibleFlag operator| (ScreenOrientations::enum_type f1 , int f2 )
QFlags<ImageConversionFlags::enum_type> operator| (ImageConversionFlags::enum_type f1 , ImageConversionFlags::enum_type f2 )
QFlags<ImageConversionFlags::enum_type> operator| (ImageConversionFlags::enum_type f1 , QFlags<ImageConversionFlags::enum_type> f2 )
QIncompatibleFlag operator| (ImageConversionFlags::enum_type f1 , int f2 )
QFlags<DockWidgetAreas::enum_type> operator| (DockWidgetAreas::enum_type f1 , DockWidgetAreas::enum_type f2 )
QFlags<DockWidgetAreas::enum_type> operator| (DockWidgetAreas::enum_type f1 , QFlags<DockWidgetAreas::enum_type> f2 )
QIncompatibleFlag operator| (DockWidgetAreas::enum_type f1 , int f2 )
QFlags<ToolBarAreas::enum_type> operator| (ToolBarAreas::enum_type f1 , ToolBarAreas::enum_type f2 )
QFlags<ToolBarAreas::enum_type> operator| (ToolBarAreas::enum_type f1 , QFlags<ToolBarAreas::enum_type> f2 )
QIncompatibleFlag operator| (ToolBarAreas::enum_type f1 , int f2 )
QFlags<Edges::enum_type> operator| (Edges::enum_type f1 , Edges::enum_type f2 )
QFlags<Edges::enum_type> operator| (Edges::enum_type f1 , QFlags<Edges::enum_type> f2 )
QIncompatibleFlag operator| (Edges::enum_type f1 , int f2 )
QFlags<InputMethodQueries::enum_type> operator| (InputMethodQueries::enum_type f1 , InputMethodQueries::enum_type f2 )
QFlags<InputMethodQueries::enum_type> operator| (InputMethodQueries::enum_type f1 , QFlags<InputMethodQueries::enum_type> f2 )
QIncompatibleFlag operator| (InputMethodQueries::enum_type f1 , int f2 )

详细描述

Qt 名称空间包含整个 Qt 库所用的杂项标识符。

类型文档编制

enum Qt:: AlignmentFlag
flags Qt:: Alignment

此枚举类型用于描述对齐。它包含可以组合以产生要求效果的水平标志和垂直标志。

The TextElideMode 枚举还可以用于在许多状况下以微调对齐文本外观。

水平标志:

常量 描述
Qt::AlignLeft 0x0001 与左边缘对齐。
Qt::AlignRight 0x0002 与右边缘对齐。
Qt::AlignHCenter 0x0004 在可用空间水平居中。
Qt::AlignJustify 0x0008 在可用空间两端对齐文本。

垂直标志:

常量 描述
Qt::AlignTop 0x0020 与顶部对齐。
Qt::AlignBottom 0x0040 与底部对齐。
Qt::AlignVCenter 0x0080 在可用空间垂直居中。
Qt::AlignBaseline 0x0100 与基线对齐。

每次只可使用一水平标志。有一个二维标志:

常量 描述
Qt::AlignCenter AlignVCenter | AlignHCenter 在两个维度上居中。

每次最多可以使用一个水平标志和一个垂直标志。Qt::AlignCenter 算作水平和垂直两者。

3 枚举值在可以从右到左模式下运行的应用程序中很有用:

常量 描述
Qt::AlignAbsolute 0x0010 若 Widget 的布局方向是 Qt::RightToLeft (而不是 Qt::LeftToRight ,默认),Qt::AlignLeft 参照 right 边缘和 Qt::AlignRight 到 left 边缘。这通常是期望行为。若想要 Qt::AlignLeft 始终意味着 left 而 Qt::AlignRight 始终意味着 right,组合标志与 Qt::AlignAbsolute。
Qt::AlignLeading AlignLeft 同义词 Qt::AlignLeft。
Qt::AlignTrailing AlignRight 同义词 Qt::AlignRight。

掩码:

常量
Qt::AlignHorizontal_Mask AlignLeft | AlignRight | AlignHCenter | AlignJustify | AlignAbsolute
Qt::AlignVertical_Mask AlignTop | AlignBottom | AlignVCenter | AlignBaseline

标志的冲突组合拥有未定义含义。

Alignment 类型是 typedef 对于 QFlags <AlignmentFlag>。它存储 AlignmentFlag 值的 OR 组合。

enum Qt:: AnchorPoint

指定可以锚定的布局项侧。这用于 QGraphicsAnchorLayout .

常量 描述
Qt::AnchorLeft 0 布局项的左侧。
Qt::AnchorHorizontalCenter 1 在布局项左侧和右侧之间的居中 "虚拟" 侧。
Qt::AnchorRight 2 布局项的右侧。
Qt::AnchorTop 3 布局项的顶侧。
Qt::AnchorVerticalCenter 4 在布局项顶部和底部之间的居中 "虚拟" 侧。
Qt::AnchorBottom 5 布局项的底侧。

另请参阅 QGraphicsAnchorLayout .

enum Qt:: ApplicationAttribute

此枚举描述改变应用程序范围特征行为的属性。这些的启用和禁用是使用 QCoreApplication::setAttribute (),且可以被测试采用 QCoreApplication::testAttribute ().

常量 描述
Qt::AA_DontShowIconsInMenus 2 具有 Icon 特性的动作不会展示在任何菜单中,除非专门设置通过 QAction::iconVisibleInMenu property. Menus that are currently open or menus already created in the native macOS menubar may not 拾取此属性中的变化。改变在 QAction::iconVisibleInMenu 特性将始终被拾取。
Qt::AA_DontShowShortcutsInContextMenus 28 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.
Qt::AA_NativeWindows 3 确保 Widget 拥有本机窗口。
Qt::AA_DontCreateNativeWidgetSiblings 4 Ensures that siblings of native widgets stay non-native unless specifically set by the Qt::WA_NativeWindow 属性。
Qt::AA_PluginApplication 5 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 AA_DontUseNativeMenuBar 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.
Qt::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 ).
Qt::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. QKeySequence::StandardKey will also flip accordingly (i.e., QKeySequence::Copy will be Command+C on the keyboard regardless of the value set, though what is output for QKeySequence::toString () will be different).
Qt::AA_Use96Dpi 8 假定屏幕拥有 96 DPI 分辨率,而不是使用由 OS 提供的分辨率。这将导致字体跨设备渲染一致 (以像素每点为单位),而不是定义 1 点成 1/72 英寸。
Qt::AA_SynthesizeTouchForUnhandledMouseEvents 11 应用程序不接受所有鼠标事件,取而代之将被转换成触摸事件。
Qt::AA_SynthesizeMouseForUnhandledTouchEvents 12 应用程序不接受的所有触摸事件,取而代之将转换成鼠标左键事件。默认启用此属性。
Qt::AA_UseHighDpiPixmaps 13 Make QIcon::pixmap () 生成可以大于请求大小的高 DPI (每英寸点数) 像素图。这样的像素图将拥有 devicePixelRatio() 设置值高于 1。设置此属性后,在布局几何体使用像素图大小的应用程序代码,计算通常应除以 devicePixelRatio() 以获得设备无关布局几何体。
Qt::AA_ForceRasterWidgets 14 使顶层 Widget 使用纯光栅表面,且不支持基于 GL 的非本机子级小部件。
Qt::AA_UseDesktopOpenGL 15 强制使用桌面 OpenGL (例如 opengl32.dll or libGL.so ) 在使用动态加载 OpenGL 实现的平台。此属性的设置必须先于 QGuiApplication 的构造。该值在 Qt 5.3 添加。
Qt::AA_UseOpenGLES 16 强制使用 OpenGL ES 2.0 或更高版本,在使用动态加载 OpenGL 实现的的平台。此属性的设置必须先于 QGuiApplication 的构造。该值在 Qt 5.3 添加。
Qt::AA_UseSoftwareOpenGL 17 强制使用基于软件的 OpenGL 实现,在使用动态加载 OpenGL 实现的平台。此补丁通常构建于 Mesa llvmpipe ,提供 OpenGL 2.1。值可能没有效果,若这种 OpenGL 实现不可用。此库的默认名称为 opengl32sw.dll 且可以被覆盖通过设置环境变量 QT_OPENGL_DLL 。见特定平台页面,例如 Qt for Windows ,了解更多信息。此属性的设置必须先于 QGuiApplication 的构造。该值在 Qt 5.4 添加。
Qt::AA_ShareOpenGLContexts 18 启用 OpenGL 上下文之间的资源共享,用于类像 QOpenGLWidget and QQuickWidget 。这允许共享 OpenGL 资源 (像纹理) 介于 QOpenGLWidget 实例 (属于不同顶层窗口)。此属性的设置必须先于 QGuiApplication 的构造。该值在 Qt 5.4 添加。
Qt::AA_SetPalette 19 指示是否明确设置调色板在 QGuiApplication 。该值在 Qt 5.5 添加。
Qt::AA_EnableHighDpiScaling 20 在支持平台启用 Qt 高 DPI 比例缩放 (另请参阅 高 DPI 显示 ). 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.
Qt::AA_DisableHighDpiScaling 21 禁用 Qt 高 DPI (每英寸点数) 比例缩放,暴露窗口系统坐标。注意,窗口系统自己可能做比例缩放,所以这不保证 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.
Qt::AA_UseStyleSheetPropagationInWidgetStyles 22 默认情况下,Qt 样式表禁用常规 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 方法。见 The Style Sheet Syntax - Inheritance for more details. This value was added in Qt 5.7.
Qt::AA_DontUseNativeDialogs 23 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.
Qt::AA_SynthesizeMouseForUnhandledTabletEvents 24 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.
Qt::AA_CompressHighFrequencyEvents 25 启用某些频繁事件的压缩。在 X11 窗口系统,默认值为 true,意味着 QEvent::MouseMove , QEvent::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.
Qt::AA_CompressTabletEvents 29 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.
Qt::AA_DontCheckOpenGLContextThreadAffinity 26 当制作上下文当前使用 QOpenGLContext ,不校验 QObject thread affinity QOpenGLContext object is the same thread calling makeCurrent() . This value was added in Qt 5.8.
Qt::AA_DisableShaderDiskCache 27 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.
Qt::AA_DisableWindowContextHelpButton 30 禁用 WindowContextHelpButtonHint by default on Qt::Sheet and Qt::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.

The following values are deprecated or obsolete:

常量 描述
Qt::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.
Qt::AA_MacPluginApplication AA_PluginApplication This attribute has been deprecated. Use AA_PluginApplication instead.
Qt::AA_MSWindowsUseDirect3DByDefault 1 此值已过时且不起作用。
Qt::AA_X11InitThreads 10 此值已过时且不起作用。

enum Qt:: ApplicationState
flags Qt:: ApplicationStates

此枚举类型用于指定应用程序的当前状态。

状态是

常量 描述
Qt::ApplicationSuspended 0x00000000 The application is about to suspend. When entering this state, the application should save its state, cease all activities, and be prepared for code execution to stop. While suspended, the application can be killed at any time without further warnings (e.g. when low memory forces the OS to purge suspended applications).
Qt::ApplicationHidden 0x00000001 The application is hidden and runs in the background. This is the normal state for applications that need to do background processing, like playing music, while the user interacts with other applications. The application should free up all graphical resources when entering this state.
Qt::ApplicationInactive 0x00000002 The application is visible, but not selected to be in front. On desktop platforms, this typically means that the user activated another application. On mobile platforms, it is more common to enter this state when the OS is interrupting the user with e.g. incoming calls or SMS-messages. While in this state, consider reducing CPU-intensive tasks.
Qt::ApplicationActive 0x00000004 The application is visible and selected to be in front.

该枚举在 Qt 5.1 引入或被修改。

ApplicationStates 类型是 typedef 对于 QFlags <ApplicationState>。它存储 ApplicationState 值的 OR 组合。

enum Qt:: ArrowType

常量
Qt::NoArrow 0
Qt::UpArrow 1
Qt::DownArrow 2
Qt::LeftArrow 3
Qt::RightArrow 4

enum Qt:: AspectRatioMode

此枚举类型定义宽高比发生了什么,当比例缩放矩形时。

常量 描述
Qt::IgnoreAspectRatio 0 大小可自由比例缩放。不保留宽高比。
Qt::KeepAspectRatio 1 大小按尽可能大矩形比例缩放到给定矩形内,保留宽高比。
Qt::KeepAspectRatioByExpanding 2 大小按尽可能小矩形比例缩放到给定矩形外,保留宽高比。

另请参阅 QSize::scale () 和 QImage::scaled ().

enum Qt:: Axis

此枚举类型定义 3 个值来表示笛卡尔坐标系中的 3 个轴。

常量 描述
Qt::XAxis 0 X 轴。
Qt::YAxis 1 Y 轴。
Qt::ZAxis 2 Z 轴。

另请参阅 QTransform::rotate () 和 QTransform::rotateRadians ().

enum Qt:: BGMode

背景模式:

常量
Qt::TransparentMode 0
Qt::OpaqueMode 1

enum Qt:: BrushStyle

此枚举类型定义由 Qt 支持的笔刷样式,即:形状的填充图案绘制使用 QPainter .

Brush Styles

常量 描述
Qt::NoBrush 0 没有笔刷图案。
Qt::SolidPattern 1 统一颜色。
Qt::Dense1Pattern 2 极度密集的笔刷图案。
Qt::Dense2Pattern 3 非常密集的笔刷图案。
Qt::Dense3Pattern 4 有点密集的笔刷图案。
Qt::Dense4Pattern 5 一半密集的笔刷图案。
Qt::Dense5Pattern 6 有点稀疏的笔刷图案。
Qt::Dense6Pattern 7 非常稀疏的笔刷图案。
Qt::Dense7Pattern 8 极度稀疏的笔刷图案。
Qt::HorPattern 9 水平线。
Qt::VerPattern 10 垂直线。
Qt::CrossPattern 11 交叉水平线和垂直线。
Qt::BDiagPattern 12 向后的对角线。
Qt::FDiagPattern 13 向前的对角线。
Qt::DiagCrossPattern 14 交叉对角线。
Qt::LinearGradientPattern 15 线性渐变 (设置使用专用 QBrush 构造函数)。
Qt::ConicalGradientPattern 17 锥形渐变 (设置使用专用 QBrush 构造函数)。
Qt::RadialGradientPattern 16 径向渐变 (设置使用专用 QBrush 构造函数)。
Qt::TexturePattern 24 自定义图案 (见 QBrush::setTexture ()).

另请参阅 QBrush .

enum Qt:: CaseSensitivity

常量
Qt::CaseInsensitive 0
Qt::CaseSensitive 1

enum Qt:: CheckState

此枚举描述可复选项、控件及 Widget 的状态。

常量 描述
Qt::Unchecked 0 项被取消复选。
Qt::PartiallyChecked 1 项被部分复选。在分层模型中的项可能被部分复选,若复选某些而非全部子级。
Qt::Checked 2 项被复选。

另请参阅 QCheckBox , Qt::ItemFlags ,和 Qt::ItemDataRole .

enum Qt:: ChecksumType

此枚举描述可能的标准用于 qChecksum ().

常量 描述
Qt::ChecksumIso3309 0 基于 ISO 3309 的校验和计算。
Qt::ChecksumItuV41 1 基于 ITU-V.41 的校验和计算。

该枚举在 Qt 5.9 引入或被修改。

enum Qt:: ClipOperation

常量 描述
Qt::NoClip 0 此操作关闭裁剪。
Qt::ReplaceClip 1 以函数调用中提供的,替换当前裁剪路径/矩形/区域。
Qt::IntersectClip 2 相交当前裁剪路径/矩形/区域与函数调用所提供的。

enum Qt:: ConnectionType

此枚举描述可以用于信号和槽之间的连接类型。尤其,它确定是把特定信号立即交付给槽,还是在以后队列交付。

常量 描述
Qt::AutoConnection 0 (默认) 若接收者 活在 发射信号的线程,使用 Qt::DirectConnection。否则,使用 Qt::QueuedConnection。确定连接类型当发射信号时。
Qt::DirectConnection 1 槽被立即援引当发射信号时。槽在发信号的线程中执行。
Qt::QueuedConnection 2 槽被援引当控制返回给接收者线程的事件循环时。槽在接收者线程中执行。
Qt::BlockingQueuedConnection 3 如同 Qt::QueuedConnection,除了发信号线程阻塞直到槽返回为止。此连接必须 not 被使用,若接收者活在发信号线程中,否则应用程序将死锁。
Qt::UniqueConnection 0x80 这是可以使用按位 OR (或) 与上述任何连接类型之一组合的标志。当 Qt::UniqueConnection 被设置时, QObject::connect () 会失败若连接已存在 (即:若同一对对象的相同信号已经连接到相同槽)。该标志在 Qt 4.6 引入。

采用队列连接,参数类型必须是 Qt 元对象系统知道的,因为 Qt 需要拷贝自变量以存储它们在幕后事件中。若试着队列排队连接并获得错误消息:

QObject::connect: Cannot queue arguments of type 'MyType'
					

调用 qRegisterMetaType () 以注册数据类型在建立连接之前。

当使用信号和槽采用多个线程时,见 信号和槽跨线程 .

另请参阅 Qt 中的线程支持 , QObject::connect (), qRegisterMetaType (),和 Q_DECLARE_METATYPE ().

enum Qt:: ContextMenuPolicy

此枚举类型定义 Widget 在展示上下文菜单方面可以采用的各种策略。

常量 描述
Qt::NoContextMenu 0 Widget 不提供上下文菜单,上下文菜单的处理被延期到 Widget 的父级。
Qt::PreventContextMenu 4 Widget 不提供上下文菜单,且相比 NoContextMenu ,处理 not 被延期到 Widget 的父级。这意味着所有鼠标右键事件保证都被交付给 Widget 本身,透过 QWidget::mousePressEvent (),和 QWidget::mouseReleaseEvent ().
Qt::DefaultContextMenu 1 Widget 的 QWidget::contextMenuEvent () 处理程序被调用。
Qt::ActionsContextMenu 2 Widget 显示其 QWidget::actions () 作为上下文菜单。
Qt::CustomContextMenu 3 Widget 发射 QWidget::customContextMenuRequested () 信号。

enum Qt:: CoordinateSystem

此枚举指定坐标系。

常量 描述
Qt::DeviceCoordinates 0 坐标相对于对象的描绘设备的左上角。
Qt::LogicalCoordinates 1 坐标相对于对象的左上角。

该枚举在 Qt 4.6 引入或被修改。

enum Qt:: Corner

此枚举类型指定矩形角落:

常量 描述
Qt::TopLeftCorner 0x00000 矩形左上角。
Qt::TopRightCorner 0x00001 矩形的右上角。
Qt::BottomLeftCorner 0x00002 矩形的左下角。
Qt::BottomRightCorner 0x00003 矩形的右下角。

enum Qt:: CursorMoveStyle

此枚举描述文本光标的可用移动样式。选项:

常量 描述
Qt::LogicalMoveStyle 0 在从左到右文本块中,按下向左箭头键时递减光标位置,按下向右箭头键时递增光标位置。若文本块是从右到左,则应用相反的行为。应用相反行为。
Qt::VisualMoveStyle 1 按左箭头键始终导致光标向左移动,不管文本书写方向。按右箭头键始终导致光标向右移动。

enum Qt:: CursorShape

此枚举类型定义可以使用的各种光标。

标准箭头光标是处于正常状态的 Widget 的默认值。

常量 描述
Qt::ArrowCursor 0 标准箭头光标。
Qt::UpArrowCursor 1 向上指向屏幕顶部的箭头。
Qt::CrossCursor 2 十字瞄准线光标,通常用于帮助用户精确选择屏幕点。
Qt::WaitCursor 3 沙漏或手表光标,通常在阻止用户和应用程序交互的操作期间展示。
Qt::IBeamCursor 4 ^ 插入符号或 I-beam 光标,指示 Widget 可以接受和显示文本输入。
Qt::SizeVerCursor 5 用于垂直重置顶层窗口大小的元素的光标。
Qt::SizeHorCursor 6 用于水平重置顶层窗口大小的元素的光标。
Qt::SizeBDiagCursor 7 用于在右上角和左下角对角重置顶层窗口大小的元素的光标。
Qt::SizeFDiagCursor 8 用于在左上角和右下角对角重置顶层窗口大小的元素的光标。
Qt::SizeAllCursor 9 用于在任何方向重置顶层窗口大小的元素的光标。
Qt::BlankCursor 10 空白/不可见光标,通常在需要隐藏光标形状时使用。
Qt::SplitVCursor 11 用于垂直分割器的光标,指示可以水平拖曳手柄以调节可用空间的使用。
Qt::SplitHCursor 12 用于水平分割器的光标,指示可以垂直拖曳手柄以调节可用空间的使用。
Qt::PointingHandCursor 13 指向手形光标,通常用于可点击元素,譬如:超链接。
Qt::ForbiddenCursor 14 斜杠圆形光标,通常在拖放操作期间使用,指示拖曳内容不可以掉落在特定 Widget 中 (或某些区域内)。
Qt::OpenHandCursor 17 表示张开手的光标,通常用于指示光标下区域是画布的可见部分,用户可以单击并拖曳环绕卷动。
Qt::ClosedHandCursor 18 表示闭合手的光标,通常用于指示正涉及卷动的拖曳操作。
Qt::WhatsThisCursor 15 带问号的箭头,通常用于指示存在 What's This? 小部件帮助。
Qt::BusyCursor 16 沙漏或手表光标,通常在允许用户在后台履行与应用程序交互的操作期间展示。
Qt::DragMoveCursor 20 通常使用的光标当拖曳项时。
Qt::DragCopyCursor 19 通常使用的光标当拖曳项以拷贝它时。
Qt::DragLinkCursor 21 通常使用的光标当拖曳项以链接到它时。
Qt::BitmapCursor 24

enum Qt:: DateFormat

常量 描述
Qt::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 QDate::toString () 了解更多信息。
Qt::ISODate 1 ISO 8601 扩展格式:要么 yyyy-MM-dd for dates or yyyy-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.
Qt::ISODateWithMs 9 ISO 8601 扩展格式,包括毫秒 (若适用)。
Qt::SystemLocaleShortDate 4 The short 格式 用于 操作系统 .
Qt::SystemLocaleLongDate 5 The long 格式 用于 操作系统 .
Qt::DefaultLocaleShortDate 6 The short 格式 指定通过 应用程序的区域设置 .
Qt::DefaultLocaleLongDate 7 The long 格式 用于 应用程序的区域设置 .
Qt::SystemLocaleDate 2 此枚举值被弃用。 使用 Qt::SystemLocaleShortDate 代替 (或 Qt::SystemLocaleLongDate 若想要 long 日期)。
Qt::LocaleDate 3 此枚举值被弃用。 使用 Qt::DefaultLocaleShortDate 代替 (或 Qt::DefaultLocaleLongDate 若想要 long 日期)。
Qt::LocalDate SystemLocaleDate 此枚举值被弃用。 使用 Qt::SystemLocaleShortDate 代替 (或 Qt::SystemLocaleLongDate 若想要 long 日期)。
Qt::RFC2822Date 8 RFC 2822 , RFC 850 and RFC 1036 格式:要么 [ddd,] dd MMM yyyy hh:mm[:ss] +/-TZ or ddd MMM dd yyyy hh:mm[:ss] +/-TZ 为组合日期和时间。

注意: For ISODate 格式,各 Y , M and D represents a single digit of the year, month and day used to specify the date. Each H , M and S represents a single digit of the hour, minute and second used to specify the time. The presence of a literal T character is used to separate the date and time when both are specified.

enum Qt:: DayOfWeek

常量
Qt::Monday 1
Qt::Tuesday 2
Qt::Wednesday 3
Qt::Thursday 4
Qt::Friday 5
Qt::Saturday 6
Qt::Sunday 7

enum Qt:: DockWidgetArea
flags Qt:: DockWidgetAreas

常量
Qt::LeftDockWidgetArea 0x1
Qt::RightDockWidgetArea 0x2
Qt::TopDockWidgetArea 0x4
Qt::BottomDockWidgetArea 0x8
Qt::AllDockWidgetAreas DockWidgetArea_Mask
Qt::NoDockWidgetArea 0

DockWidgetAreas 类型是 typedef 对于 QFlags <DockWidgetArea>。它存储 DockWidgetArea 值的 OR 组合。

enum Qt:: DropAction
flags Qt:: DropActions

常量 描述
Qt::CopyAction 0x1 将数据拷贝到目标。
Qt::MoveAction 0x2 将数据从源移到目标。
Qt::LinkAction 0x4 创建从源到目标的链接。
Qt::ActionMask 0xff
Qt::IgnoreAction 0x0 忽略动作 (对数据什么都不做)。
Qt::TargetMoveAction 0x8002 在 Windows,使用此值当目标应用程序应接管 D&D 数据的所有权时 (即:源应用程序不应删除数据)。在 X11,此值用于处理移动。在 Mac 不使用 TargetMoveAction。

DropActions 类型是 typedef 对于 QFlags <DropAction>。它存储 DropAction 值的 OR 组合。

enum Qt:: Edge
flags Qt:: Edges

此枚举类型指定矩形边缘:

常量 描述
Qt::TopEdge 0x00001 矩形上边缘。
Qt::LeftEdge 0x00002 矩形左边缘。
Qt::RightEdge 0x00004 矩形右边缘。
Qt::BottomEdge 0x00008 矩形下边缘。

该枚举在 Qt 5.1 引入或被修改。

Edges 类型是 typedef 对于 QFlags <Edge>。它存储 Edge 值的 OR 组合。

enum Qt:: EnterKeyType

这可以用于更改屏幕键盘 Return 键的外观。

注意: Not all of these values are supported on all platforms. For unsupported values the default key will be used instead.

常量 描述
Qt::EnterKeyDefault 0 The default Enter key. This can either be a button closing the keyboard, or a Return button causing a new line in case of a multi-line input field.
Qt::EnterKeyReturn 1 Show a Return button that inserts a new line. The keyboard will not close when this button is pressed.
Qt::EnterKeyDone 2 Show a "Done" button. The keyboard will close when this button is pressed.
Qt::EnterKeyGo 3 Show a "Go" button. Typically used in an address bar when entering a URL; the keyboard will close when this button is pressed.
Qt::EnterKeySend 4 Show a "Send" button. The keyboard will close when this button is pressed.
Qt::EnterKeySearch 5 Show a "Search" button. The keyboard will close when this button is pressed.
Qt::EnterKeyNext 6 Show a "Next" button. Typically used in a form to allow navigating to the next input field; the keyboard will not close when this button is pressed.
Qt::EnterKeyPrevious 7 Show a "Previous" button. The keyboard will not close when this button is pressed.

该枚举在 Qt 5.6 引入或被修改。

enum Qt:: EventPriority

此枚举可用于指定事件优先级。

常量 描述
Qt::HighEventPriority 1 发送具有此优先级的事件,在具有 NormalEventPriority (或 LowEventPriority) 事件之前。
Qt::NormalEventPriority 0 具有此优先级的事件在具有 HighEventPriority 的事件之后 (但在具有 LowEventPriority 的事件之前) 发送。
Qt::LowEventPriority -1 具有此优先级的事件在具有 HighEventPriority (或 NormalEventPriority) 的事件之后发送。

注意,提供这些值纯粹是为了方便,因为事件优先级可以是任意值介于 INT_MAX and INT_MIN (包括在内)。例如,可以将自定义优先级定义成彼此相对:

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
};
					

另请参阅 QCoreApplication::postEvent ().

enum Qt:: FillRule

指定应该使用哪种方法来填充路径和多边形。

常量 描述
Qt::OddEvenFill 0 指定使用奇偶填充规则填充区域。根据此规则,通过使用随后方法确定点是否在形状内。从该点绘制水平线到形状外部位置,计算交点数。若交点数为奇数,则点在形状内。这是默认模式。
Qt::WindingFill 1 指定使用非 0 卷绕规则填充区域。根据此规则,通过使用随后方法确定点是否在形状内。从该点绘制水平线到形状外部位置。确定每个交点处线的方向是向上,还是向下。通过求和每交叉点方向,确定卷绕数。若数字非 0,则点位于形状内。在大多数情况下,此填充模式还被认为是闭合形状的交集。

enum Qt:: FindChildOption
flags Qt:: FindChildOptions

常量 描述
Qt::FindDirectChildrenOnly 0x0 仅查找对象的直接子级。
Qt::FindChildrenRecursively 0x1 查找对象的所有子级 (递归搜索)。

FindChildOptions 类型是 typedef 对于 QFlags <FindChildOption>。它存储 FindChildOption 值的 OR 组合。

enum Qt:: FocusPolicy

此枚举类型定义 Widget 在获得键盘聚焦方面可以拥有的各种策略。

常量 描述
Qt::TabFocus 0x1 Widget 通过 Tab 键接受聚焦。
Qt::ClickFocus 0x2 Widget 通过点击接受聚焦。
Qt::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'.
Qt::WheelFocus StrongFocus | 0x4 像 Qt::StrongFocus + 小部件通过使用鼠标滚轮接受聚焦。
Qt::NoFocus 0 Widget 不接受聚焦。

enum Qt:: FocusReason

此枚举指定聚焦为什么改变。它会被传递透过 QWidget::setFocus 且可以检索在 QFocusEvent 被发送给 Widget 当聚焦改变时。

常量 描述
Qt::MouseFocusReason 0 发生鼠标动作。
Qt::TabFocusReason 1 按下 Tab 键。
Qt::BacktabFocusReason 2 发生 Backtab。输入可能包括 Shift 或 Control 键;如 Shift+Tab。
Qt::ActiveWindowFocusReason 3 窗口系统使此窗口活动或不活动。
Qt::PopupFocusReason 4 应用程序打开/关闭弹出窗口,抓取/释放键盘焦点。
Qt::ShortcutFocusReason 5 用户键入标签的好友快捷方式
Qt::MenuBarFocusReason 6 菜单栏获得聚焦。
Qt::OtherFocusReason 7 另一原因,通常特定于应用程序。

另请参阅 Widget 中的键盘焦点 .

enum Qt:: GestureFlag
flags Qt:: GestureFlags

此枚举类型描述可以使用的额外标志,当订阅手势时。

常量 描述
Qt::DontStartGestureOnChildren 0x01 默认情况下,手势可以从 Widget 或其任何子级开始。使用此标志可禁用此并仅允许从 Widget 开始手势。
Qt::ReceivePartialGestures 0x02 允许将任何忽略手势事件传播给有指定此提示的父级 Widget。默认情况下,手势处于 Qt::GestureStarted 状态才被传播且 Widget 始终获取完整手势序列开始采用手势处于 Qt::GestureStarted 状态和结束采用手势处于 Qt::GestureFinished or Qt::GestureCanceled 状态。
Qt::IgnoredGesturesPropagateToParent 0x04 从 Qt 4.7 起,此标志允许微调手势事件传播。通过设置标志当 grabbing 手势,全部忽略的部分手势将被传播给其父级项。

该枚举在 Qt 4.6 引入或被修改。

GestureFlags 类型是 typedef 对于 QFlags <GestureFlag>。它存储 GestureFlag 值的 OR 组合。

另请参阅 QWidget::grabGesture () 和 QGraphicsObject::grabGesture ().

enum Qt:: GestureState

此枚举类型描述手势的状态。

常量 描述
Qt::NoGesture 0 未检测到手势。
Qt::GestureStarted 1 连续手势已开始。
Qt::GestureUpdated 2 手势继续。
Qt::GestureFinished 3 手势已完成。
Qt::GestureCanceled 4 手势被取消。

该枚举在 Qt 4.6 引入或被修改。

另请参阅 QGesture .

enum Qt:: GestureType

此枚举类型描述标准手势。

常量 描述
Qt::TapGesture 1 敲击手势。
Qt::TapAndHoldGesture 2 敲击并保持 (长敲击) 手势。
Qt::PanGesture 3 平移手势。
Qt::PinchGesture 4 捏合手势。
Qt::SwipeGesture 5 轻扫手势。
Qt::CustomGesture 0x0100 可以用于测试的标志,若手势是用户定义手势 ID。

注册用户定义手势采用 QGestureRecognizer::registerRecognizer () 函数,其生成带 Qt::CustomGesture 设置标志的自定义手势 ID。

该枚举在 Qt 4.6 引入或被修改。

另请参阅 QGesture , QWidget::grabGesture (),和 QGraphicsObject::grabGesture ().

enum Qt:: GlobalColor

Qt 的预定义 QColor 对象:

常量 描述
Qt::white 3 白色 (#ffffff)
Qt::black 2 黑色 (#000000)
Qt::red 7 红色 (#ff0000)
Qt::darkRed 13 深红色 (#800000)
Qt::green 8 绿色 (#00ff00)
Qt::darkGreen 14 深绿色 (#008000)
Qt::blue 9 蓝色 (#0000ff)
Qt::darkBlue 15 深蓝色 (#000080)
Qt::cyan 10 青色 (#00ffff)
Qt::darkCyan 16 深青色 (#008080)
Qt::magenta 11 洋红色 (#ff00ff)
Qt::darkMagenta 17 深洋红色 (#800080)
Qt::yellow 12 黄色 (#ffff00)
Qt::darkYellow 18 深黄色 (#808000)
Qt::gray 5 灰色 (#a0a0a4)
Qt::darkGray 4 深灰色 (#808080)
Qt::lightGray 6 浅灰色 (#c0c0c0)
Qt::transparent 19 透明黑色值 (即, QColor (0, 0, 0, 0))
Qt::color0 0 0 像素值 (用于位图)
Qt::color1 1 1 像素值 (用于位图)

另请参阅 QColor .

typedef Qt:: HANDLE

系统对象的句柄类型,定义为 void * 在所有平台。

enum Qt:: HitTestAccuracy

此枚举包含的精度类型可以用于 QTextDocument 类当测试鼠标点击文本文档时。

常量 描述
Qt::ExactHit 0 输入出现点必须与文档的输入敏感部分准确重合。
Qt::FuzzyHit 1 输入出现点可以接近文档的输入敏感部分。

enum Qt:: ImageConversionFlag
flags Qt:: ImageConversionFlags

选项标记设置 default,若不包括来自列表的其它值 (由于默认为 0):

彩色/单色首选 (被忽略对于 QBitmap ):

常量 描述
Qt::AutoColor 0x00000000 (默认) - 若图像有 depth 1 且只包含黑色和白色像素,像素图变为单色。
Qt::ColorOnly 0x00000003 像素图抖动/转换为 本机显示深度 .
Qt::MonoOnly 0x00000002 像素图变成单色。若有必要,使用所选抖动算法进行抖动。

抖动模式首选:

常量 描述
Qt::DiffuseDither 0x00000000 (默认) - 使用误差扩散的高质量抖动。
Qt::OrderedDither 0x00000010 更快,有序抖动。
Qt::ThresholdDither 0x00000020 没有抖动;使用最接近的颜色。

1 位 Alpha 蒙版的抖动模式首选:

常量 描述
Qt::ThresholdAlphaDither 0x00000000 (默认) - 没有抖动。
Qt::OrderedAlphaDither 0x00000004 更快,有序抖动。
Qt::DiffuseAlphaDither 0x00000008 使用误差扩散的高质量抖动。

颜色匹配 vs 抖动偏好:

常量 描述
Qt::PreferDither 0x00000040 始终抖动图像,当转换到更小色彩空间时。
Qt::AvoidDither 0x00000080 仅抖动索引格式,若源图像比目的地格式颜色表大小使用了更多的不同颜色。
Qt::AutoDither 0x00000000 (默认) - 才抖动当向下转换成 1 位或 8 位索引格式时。
Qt::NoOpaqueDetection 0x00000100 不校验图像是否包含透明像素。使用这,若知道图像是半透明的,且想要避免校验图像像素 (直到找到不透明像素为止) 的开销,或者若出于某些其它原因想要像素图保留 Alpha 通道。若图像没有 Alpha 通道,此标志不起作用。
Qt::NoFormatConversion 0x00000200 不对图像做任何格式转换。可能很有用当转换 QImage QPixmap (例如:一次渲染操作)。注意, QPixmap 不按首选格式作为描绘设备将慢得多。

ImageConversionFlags 类型是 typedef 对于 QFlags <ImageConversionFlag>。它存储 ImageConversionFlag 值的 OR 组合。

enum Qt:: InputMethodHint
flags Qt:: InputMethodHints

常量 描述
Qt::ImhNone 0x0 没有提示。

更改行为的标志:

常量 描述
Qt::ImhHiddenText 0x1 输入法不应该展示字符当键入时。这是自动设置的当设置 QLineEdit::echoMode to Password 。注意:设置 ImhHiddenText 不会改变回显模式。
Qt::ImhSensitiveData 0x2 活动输入法不应该把键入文本存储在任何持久性存储中 (像预测用户字典)。
Qt::ImhNoAutoUppercase 0x4 输入法不应该试着自动切换到大写当句子结束时。
Qt::ImhPreferNumbers 0x8 数字是首选的 (但不是必需的)。
Qt::ImhPreferUppercase 0x10 大写字母是首选的 (但不是必需的)。
Qt::ImhPreferLowercase 0x20 小写字母是首选的 (但不是必需的)。
Qt::ImhNoPredictiveText 0x40 键入时不使用预测文本 (即:查找字典)。
Qt::ImhDate 0x80 作为日期字段的文本编辑器函数。
Qt::ImhTime 0x100 作为时间字段的文本编辑器函数。
Qt::ImhPreferLatin 0x200 拉丁字符是首选的 (但不是必需的)。
Qt::ImhMultiLine 0x400 可以在文本字段中录入多行。
Qt::ImhNoEditMenu 0x800 不使用内置编辑菜单。该标志在 Qt 5.11 引入。
Qt::ImhNoTextHandles 0x1000 不使用内置文本光标和选定手柄。该标志在 Qt 5.11 引入。

限定输入的标志 (排斥标志):

常量 描述
Qt::ImhDigitsOnly 0x10000 只允许数字。
Qt::ImhFormattedNumbersOnly 0x20000 只允许输入数字。这包括小数点和负号。
Qt::ImhUppercaseOnly 0x40000 只允许输入大写字母。
Qt::ImhLowercaseOnly 0x80000 只允许输入小写字母。
Qt::ImhDialableCharactersOnly 0x100000 只允许适于电话拨号的字符。
Qt::ImhEmailCharactersOnly 0x200000 只允许适于 Email 地址的字符。
Qt::ImhUrlCharactersOnly 0x400000 只允许适于 URL 的字符。
Qt::ImhLatinOnly 0x800000 只允许基于拉丁语的输入。

掩码:

常量 描述
Qt::ImhExclusiveInputMask 0xffff0000 此掩码产生非 0 若使用任何排斥标志。

注意: 若几个独占标志被 OR 在一起,则结果字符集将由指定集的并集组成。例如,指定 ImhNumbersOnly and ImhUppercaseOnly 将产生由数字和大写字母组成的集。

InputMethodHints 类型是 typedef 对于 QFlags <InputMethodHint>。它存储 InputMethodHint 值的 OR 组合。

另请参阅 QGraphicsItem::inputMethodHints ().

enum Qt:: InputMethodQuery
flags Qt:: InputMethodQueries

常量 描述
Qt::ImEnabled 0x1 Widget 接受输入法输入。
Qt::ImMicroFocus 0x2 此查询已过时。使用 ImCursorRectangle 代替。
Qt::ImCursorRectangle 0x2 在 Widget 坐标中覆盖输入光标区域的矩形。
Qt::ImFont 0x4 目前文本输入使用的字体。
Qt::ImCursorPosition 0x8 在环绕输入区域文本中的光标逻辑位置 (见 ImSurroundingText ).
Qt::ImSurroundingText 0x10 输入区域周围的纯文本,例如:当前段落。
Qt::ImCurrentSelection 0x20 目前选中的文本。
Qt::ImMaximumTextLength 0x40 Widget 可以保持的最大字符数。若没有限制, QVariant::QVariant () 被返回。
Qt::ImAnchorPosition 0x80 选定锚点的位置。这可能小于或大于 ImCursorPosition , 从属光标选择哪侧。若未选择,它的返回如同 ImCursorPosition .
Qt::ImHints 0x100 有关期望输入的输入法提示。(见 Qt::InputMethodHints )
Qt::ImPreferredLanguage 0x200 首选的输入语言。
Qt::ImPlatformData 0x80000000 用于输入法的特定平台数据。
Qt::ImAbsolutePosition 0x400 在整个文档中的光标逻辑位置。
Qt::ImTextBeforeCursor 0x800 光标前的纯文本。Widget 可以决定要返回多少文本,但 must 不返回空字符串,除非光标在文档开头。
Qt::ImTextAfterCursor 0x1000 光标后的纯文本。Widget 可以决定要返回多少文本,但 must 不返回空字符串,除非光标在文档末尾。
Qt::ImEnterKeyType 0x2000 键入 Enter 键。
Qt::ImAnchorRectangle 0x4000 选定锚点的边界矩形。该值在 Qt 5.7 添加。
Qt::ImInputItemClipRectangle 0x8000 实际暴露的输入项矩形。输入项部分可以剪切。此值会考虑裁剪并返回实际描绘项矩形。矩形按 Widget 坐标。

掩码:

常量 描述
Qt::ImQueryInput ImCursorRectangle | ImCursorPosition | ImSurroundingText | ImCurrentSelection | ImAnchorRectangle | ImAnchorPosition 通常在输入时更改特性。
Qt::ImQueryAll 0xffffffff 查询所有输入法特性。

InputMethodQueries 类型是 typedef 对于 QFlags <InputMethodQuery>。它存储 InputMethodQuery 值的 OR 组合。

另请参阅 QInputMethodQueryEvent .

enum Qt:: ItemDataRole

模型中每项拥有一组与之关联的数据元素,每数据元素带有其自己的角色。视图使用角色来指示模型,其需要哪种数据类型。自定义模型应该返回这些类型的数据。

一般用途的角色 (和关联的类型):

常量 描述
Qt::DisplayRole 0 要以文本形式渲染的关键数据。( QString )
Qt::DecorationRole 1 以图标形式被渲染作为装饰的数据。( QColor , QIcon or QPixmap )
Qt::EditRole 2 按适于在编辑器中编辑的形式表示数据。( QString )
Qt::ToolTipRole 3 被显示在项工具提示中的数据。( QString )
Qt::StatusTipRole 4 被显示在状态栏中的数据。( QString )
Qt::WhatsThisRole 5 在 What's This? 方式下被显示的项数据。( QString )
Qt::SizeHintRole 13 会被提供给视图的项大小提示。( QSize )

描述外观和元数据的角色 (与关联类型):

常量 描述
Qt::FontRole 6 用于采用默认委托渲染项的字体。( QFont )
Qt::TextAlignmentRole 7 采用默认委托渲染项的文本对齐方式。( Qt::Alignment )
Qt::BackgroundRole 8 用于采用默认委托渲染项的背景笔刷。( QBrush )
Qt::BackgroundColorRole 8 此角色已过时。使用 BackgroundRole 代替。
Qt::ForegroundRole 9 用于采用默认委托渲染项的前景笔刷 (文本颜色,通常)。( QBrush )
Qt::TextColorRole 9 此角色已过时。使用 ForegroundRole 代替。
Qt::CheckStateRole 10 此角色被用于获取项的被复选状态。( Qt::CheckState )
Qt::InitialSortOrderRole 14 此角色被用于获取 Header 头视图区间的初始排序次序。( Qt::SortOrder )。此角色在 Qt 4.8 引入。

可访问性角色 (与关联类型):

常量 描述
Qt::AccessibleTextRole 11 要被用于可访问性扩展和插件 (如:屏幕阅读器) 的文本。( QString )
Qt::AccessibleDescriptionRole 12 用于可访问性目的的项描述。( QString )

用户角色:

常量 描述
Qt::UserRole 0x0100 可以被用于特定应用程序目的的第一角色。

对于用户角色,由开发者决定要使用哪种类型,并确保组件使用正确类型,当访问和设置数据时。

enum Qt:: ItemFlag
flags Qt:: ItemFlags

此枚举描述项的特性:

常量 描述
Qt::NoItemFlags 0 它没有设置任何特性。
Qt::ItemIsSelectable 1 它可以被选中。
Qt::ItemIsEditable 2 它可以被编辑。
Qt::ItemIsDragEnabled 4 可以拖曳它。
Qt::ItemIsDropEnabled 8 可以将它用作掉落目标。
Qt::ItemIsUserCheckable 16 它可以被用户复选 (或取消复选)。
Qt::ItemIsEnabled 32 用户可以与项交互。
Qt::ItemIsAutoTristate 64 项的状态从属其子级的状态。这启用父级项状态的自动管理在 QTreeWidget (复选若所有子级被复选,取消复选若所有子级被取消复选,或部分复选若仅某些子级被复选)。
Qt::ItemIsTristate ItemIsAutoTristate 此枚举值被弃用。 使用 Qt::ItemIsAutoTristate 代替。
Qt::ItemNeverHasChildren 128 项从不会有子级项。这仅用于优化目的。
Qt::ItemIsUserTristate 256 用户可以在 3 个单独状态间循环。该值在 Qt 5.5 添加。

注意,需要为可复选项提供一组合适标志和初始状态,以指示项是否被选中。这是模型/视图组件自动处理的,但需要明确设置为实例化的 QListWidgetItem , QTableWidgetItem ,和 QTreeWidgetItem .

注意,是未定义行为重新实现 QAbstractItemModel::hasChildren 以为索引返回 true 若该索引有设置 Qt::ItemNeverHasChildren 标志。

ItemFlags 类型是 typedef 对于 QFlags <ItemFlag>。它存储 ItemFlag 值的 OR 组合。

另请参阅 QAbstractItemModel .

enum Qt:: ItemSelectionMode

此枚举用于 QGraphicsItem , QGraphicsScene and QGraphicsView 以指定如何选择项,或如何确定形状和项是否冲突。

常量 描述
Qt::ContainsItemShape 0x0 输出列表仅包含项, shape 完全包含在选定区域内。与区域轮廓相交的项不包括。
Qt::IntersectsItemShape 0x1 输出列表包含两者项, shape 完全包含在选定区域内,和与区域轮廓相交的项。这是橡皮筋选定的常用模式。
Qt::ContainsItemBoundingRect 0x2 输出列表仅包含项, 边界矩形 完全包含在选定区域内。与区域轮廓相交的项不包括。
Qt::IntersectsItemBoundingRect 0x3 输出列表包含两者项, 边界矩形 完全包含在选定区域内,和与区域轮廓相交的项。此方法常用于确定需要重新绘制的区域。

另请参阅 QGraphicsScene::items (), QGraphicsScene::collidingItems (), QGraphicsView::items (), QGraphicsItem::collidesWithItem (),和 QGraphicsItem::collidesWithPath ().

enum Qt:: ItemSelectionOperation

此枚举用于 QGraphicsScene 以指定如何处理目前选中项,当设置选定区域时。

常量 描述
Qt::ReplaceSelection 0 当前选中项由选定区域中的项所替换。
Qt::AddToSelection 1 将选定区域中的项添加到当前选中项。

另请参阅 QGraphicsScene::setSelectionArea ().

enum Qt:: Key

Qt 使用的键名。

常量 描述
Qt::Key_Escape 0x01000000
Qt::Key_Tab 0x01000001
Qt::Key_Backtab 0x01000002
Qt::Key_Backspace 0x01000003
Qt::Key_Return 0x01000004
Qt::Key_Enter 0x01000005 通常位于 Keypad (小键盘) 上。
Qt::Key_Insert 0x01000006
Qt::Key_Delete 0x01000007
Qt::Key_Pause 0x01000008 Pause/Break 键 ( 注意 :与暂停媒体无关)
Qt::Key_Print 0x01000009
Qt::Key_SysReq 0x0100000a
Qt::Key_Clear 0x0100000b 相当于 Clear 键当选择 Apple 键盘模型时。在其它系统,通常把它映射到数字 Keypad (小键盘) 键 5 ,当 Num Lock is off .
Qt::Key_Home 0x01000010
Qt::Key_End 0x01000011
Qt::Key_Left 0x01000012
Qt::Key_Up 0x01000013
Qt::Key_Right 0x01000014
Qt::Key_Down 0x01000015
Qt::Key_PageUp 0x01000016
Qt::Key_PageDown 0x01000017
Qt::Key_Shift 0x01000020
Qt::Key_Control 0x01000021 On macOS , this corresponds to the Command keys.
Qt::Key_Meta 0x01000022 On macOS , this corresponds to the Control keys. On Windows keyboards, this key is mapped to the Windows key.
Qt::Key_Alt 0x01000023
Qt::Key_AltGr 0x01001103 在 Windows 发送此键的 KeyDown 事件时,还会设置 Ctrl+Alt 修饰符。
Qt::Key_CapsLock 0x01000024
Qt::Key_NumLock 0x01000025
Qt::Key_ScrollLock 0x01000026
Qt::Key_F1 0x01000030
Qt::Key_F2 0x01000031
Qt::Key_F3 0x01000032
Qt::Key_F4 0x01000033
Qt::Key_F5 0x01000034
Qt::Key_F6 0x01000035
Qt::Key_F7 0x01000036
Qt::Key_F8 0x01000037
Qt::Key_F9 0x01000038
Qt::Key_F10 0x01000039
Qt::Key_F11 0x0100003a
Qt::Key_F12 0x0100003b
Qt::Key_F13 0x0100003c
Qt::Key_F14 0x0100003d
Qt::Key_F15 0x0100003e
Qt::Key_F16 0x0100003f
Qt::Key_F17 0x01000040
Qt::Key_F18 0x01000041
Qt::Key_F19 0x01000042
Qt::Key_F20 0x01000043
Qt::Key_F21 0x01000044
Qt::Key_F22 0x01000045
Qt::Key_F23 0x01000046
Qt::Key_F24 0x01000047
Qt::Key_F25 0x01000048
Qt::Key_F26 0x01000049
Qt::Key_F27 0x0100004a
Qt::Key_F28 0x0100004b
Qt::Key_F29 0x0100004c
Qt::Key_F30 0x0100004d
Qt::Key_F31 0x0100004e
Qt::Key_F32 0x0100004f
Qt::Key_F33 0x01000050
Qt::Key_F34 0x01000051
Qt::Key_F35 0x01000052
Qt::Key_Super_L 0x01000053
Qt::Key_Super_R 0x01000054
Qt::Key_Menu 0x01000055
Qt::Key_Hyper_L 0x01000056
Qt::Key_Hyper_R 0x01000057
Qt::Key_Help 0x01000058
Qt::Key_Direction_L 0x01000059
Qt::Key_Direction_R 0x01000060
Qt::Key_Space 0x20
Qt::Key_Any Key_Space
Qt::Key_Exclam 0x21
Qt::Key_QuoteDbl 0x22
Qt::Key_NumberSign 0x23
Qt::Key_Dollar 0x24
Qt::Key_Percent 0x25
Qt::Key_Ampersand 0x26
Qt::Key_Apostrophe 0x27
Qt::Key_ParenLeft 0x28
Qt::Key_ParenRight 0x29
Qt::Key_Asterisk 0x2a
Qt::Key_Plus 0x2b
Qt::Key_Comma 0x2c
Qt::Key_Minus 0x2d
Qt::Key_Period 0x2e
Qt::Key_Slash 0x2f
Qt::Key_0 0x30
Qt::Key_1 0x31
Qt::Key_2 0x32
Qt::Key_3 0x33
Qt::Key_4 0x34
Qt::Key_5 0x35
Qt::Key_6 0x36
Qt::Key_7 0x37
Qt::Key_8 0x38
Qt::Key_9 0x39
Qt::Key_Colon 0x3a
Qt::Key_Semicolon 0x3b
Qt::Key_Less 0x3c
Qt::Key_Equal 0x3d
Qt::Key_Greater 0x3e
Qt::Key_Question 0x3f
Qt::Key_At 0x40
Qt::Key_A 0x41
Qt::Key_B 0x42
Qt::Key_C 0x43
Qt::Key_D 0x44
Qt::Key_E 0x45
Qt::Key_F 0x46
Qt::Key_G 0x47
Qt::Key_H 0x48
Qt::Key_I 0x49
Qt::Key_J 0x4a
Qt::Key_K 0x4b
Qt::Key_L 0x4c
Qt::Key_M 0x4d
Qt::Key_N 0x4e
Qt::Key_O 0x4f
Qt::Key_P 0x50
Qt::Key_Q 0x51
Qt::Key_R 0x52
Qt::Key_S 0x53
Qt::Key_T 0x54
Qt::Key_U 0x55
Qt::Key_V 0x56
Qt::Key_W 0x57
Qt::Key_X 0x58
Qt::Key_Y 0x59
Qt::Key_Z 0x5a
Qt::Key_BracketLeft 0x5b
Qt::Key_Backslash 0x5c
Qt::Key_BracketRight 0x5d
Qt::Key_AsciiCircum 0x5e
Qt::Key_Underscore 0x5f
Qt::Key_QuoteLeft 0x60
Qt::Key_BraceLeft 0x7b
Qt::Key_Bar 0x7c
Qt::Key_BraceRight 0x7d
Qt::Key_AsciiTilde 0x7e
Qt::Key_nobreakspace 0x0a0
Qt::Key_exclamdown 0x0a1
Qt::Key_cent 0x0a2
Qt::Key_sterling 0x0a3
Qt::Key_currency 0x0a4
Qt::Key_yen 0x0a5
Qt::Key_brokenbar 0x0a6
Qt::Key_section 0x0a7
Qt::Key_diaeresis 0x0a8
Qt::Key_copyright 0x0a9
Qt::Key_ordfeminine 0x0aa
Qt::Key_guillemotleft 0x0ab
Qt::Key_notsign 0x0ac
Qt::Key_hyphen 0x0ad
Qt::Key_registered 0x0ae
Qt::Key_macron 0x0af
Qt::Key_degree 0x0b0
Qt::Key_plusminus 0x0b1
Qt::Key_twosuperior 0x0b2
Qt::Key_threesuperior 0x0b3
Qt::Key_acute 0x0b4
Qt::Key_mu 0x0b5
Qt::Key_paragraph 0x0b6
Qt::Key_periodcentered 0x0b7
Qt::Key_cedilla 0x0b8
Qt::Key_onesuperior 0x0b9
Qt::Key_masculine 0x0ba
Qt::Key_guillemotright 0x0bb
Qt::Key_onequarter 0x0bc
Qt::Key_onehalf 0x0bd
Qt::Key_threequarters 0x0be
Qt::Key_questiondown 0x0bf
Qt::Key_Agrave 0x0c0
Qt::Key_Aacute 0x0c1
Qt::Key_Acircumflex 0x0c2
Qt::Key_Atilde 0x0c3
Qt::Key_Adiaeresis 0x0c4
Qt::Key_Aring 0x0c5
Qt::Key_AE 0x0c6
Qt::Key_Ccedilla 0x0c7
Qt::Key_Egrave 0x0c8
Qt::Key_Eacute 0x0c9
Qt::Key_Ecircumflex 0x0ca
Qt::Key_Ediaeresis 0x0cb
Qt::Key_Igrave 0x0cc
Qt::Key_Iacute 0x0cd
Qt::Key_Icircumflex 0x0ce
Qt::Key_Idiaeresis 0x0cf
Qt::Key_ETH 0x0d0
Qt::Key_Ntilde 0x0d1
Qt::Key_Ograve 0x0d2
Qt::Key_Oacute 0x0d3
Qt::Key_Ocircumflex 0x0d4
Qt::Key_Otilde 0x0d5
Qt::Key_Odiaeresis 0x0d6
Qt::Key_multiply 0x0d7
Qt::Key_Ooblique 0x0d8
Qt::Key_Ugrave 0x0d9
Qt::Key_Uacute 0x0da
Qt::Key_Ucircumflex 0x0db
Qt::Key_Udiaeresis 0x0dc
Qt::Key_Yacute 0x0dd
Qt::Key_THORN 0x0de
Qt::Key_ssharp 0x0df
Qt::Key_division 0x0f7
Qt::Key_ydiaeresis 0x0ff
Qt::Key_Multi_key 0x01001120
Qt::Key_Codeinput 0x01001137
Qt::Key_SingleCandidate 0x0100113c
Qt::Key_MultipleCandidate 0x0100113d
Qt::Key_PreviousCandidate 0x0100113e
Qt::Key_Mode_switch 0x0100117e
Qt::Key_Kanji 0x01001121
Qt::Key_Muhenkan 0x01001122
Qt::Key_Henkan 0x01001123
Qt::Key_Romaji 0x01001124
Qt::Key_Hiragana 0x01001125
Qt::Key_Katakana 0x01001126
Qt::Key_Hiragana_Katakana 0x01001127
Qt::Key_Zenkaku 0x01001128
Qt::Key_Hankaku 0x01001129
Qt::Key_Zenkaku_Hankaku 0x0100112a
Qt::Key_Touroku 0x0100112b
Qt::Key_Massyo 0x0100112c
Qt::Key_Kana_Lock 0x0100112d
Qt::Key_Kana_Shift 0x0100112e
Qt::Key_Eisu_Shift 0x0100112f
Qt::Key_Eisu_toggle 0x01001130
Qt::Key_Hangul 0x01001131
Qt::Key_Hangul_Start 0x01001132
Qt::Key_Hangul_End 0x01001133
Qt::Key_Hangul_Hanja 0x01001134
Qt::Key_Hangul_Jamo 0x01001135
Qt::Key_Hangul_Romaja 0x01001136
Qt::Key_Hangul_Jeonja 0x01001138
Qt::Key_Hangul_Banja 0x01001139
Qt::Key_Hangul_PreHanja 0x0100113a
Qt::Key_Hangul_PostHanja 0x0100113b
Qt::Key_Hangul_Special 0x0100113f
Qt::Key_Dead_Grave 0x01001250
Qt::Key_Dead_Acute 0x01001251
Qt::Key_Dead_Circumflex 0x01001252
Qt::Key_Dead_Tilde 0x01001253
Qt::Key_Dead_Macron 0x01001254
Qt::Key_Dead_Breve 0x01001255
Qt::Key_Dead_Abovedot 0x01001256
Qt::Key_Dead_Diaeresis 0x01001257
Qt::Key_Dead_Abovering 0x01001258
Qt::Key_Dead_Doubleacute 0x01001259
Qt::Key_Dead_Caron 0x0100125a
Qt::Key_Dead_Cedilla 0x0100125b
Qt::Key_Dead_Ogonek 0x0100125c
Qt::Key_Dead_Iota 0x0100125d
Qt::Key_Dead_Voiced_Sound 0x0100125e
Qt::Key_Dead_Semivoiced_Sound 0x0100125f
Qt::Key_Dead_Belowdot 0x01001260
Qt::Key_Dead_Hook 0x01001261
Qt::Key_Dead_Horn 0x01001262
Qt::Key_Dead_Stroke 0x01001263
Qt::Key_Dead_Abovecomma 0x01001264
Qt::Key_Dead_Abovereversedcomma 0x01001265
Qt::Key_Dead_Doublegrave 0x01001266
Qt::Key_Dead_Belowring 0x01001267
Qt::Key_Dead_Belowmacron 0x01001268
Qt::Key_Dead_Belowcircumflex 0x01001269
Qt::Key_Dead_Belowtilde 0x0100126a
Qt::Key_Dead_Belowbreve 0x0100126b
Qt::Key_Dead_Belowdiaeresis 0x0100126c
Qt::Key_Dead_Invertedbreve 0x0100126d
Qt::Key_Dead_Belowcomma 0x0100126e
Qt::Key_Dead_Currency 0x0100126f
Qt::Key_Dead_a 0x01001280
Qt::Key_Dead_A 0x01001281
Qt::Key_Dead_e 0x01001282
Qt::Key_Dead_E 0x01001283
Qt::Key_Dead_i 0x01001284
Qt::Key_Dead_I 0x01001285
Qt::Key_Dead_o 0x01001286
Qt::Key_Dead_O 0x01001287
Qt::Key_Dead_u 0x01001288
Qt::Key_Dead_U 0x01001289
Qt::Key_Dead_Small_Schwa 0x0100128a
Qt::Key_Dead_Capital_Schwa 0x0100128b
Qt::Key_Dead_Greek 0x0100128c
Qt::Key_Dead_Lowline 0x01001290
Qt::Key_Dead_Aboveverticalline 0x01001291
Qt::Key_Dead_Belowverticalline 0x01001292
Qt::Key_Dead_Longsolidusoverlay 0x01001293
Qt::Key_Back 0x01000061
Qt::Key_Forward 0x01000062
Qt::Key_Stop 0x01000063
Qt::Key_Refresh 0x01000064
Qt::Key_VolumeDown 0x01000070
Qt::Key_VolumeMute 0x01000071
Qt::Key_VolumeUp 0x01000072
Qt::Key_BassBoost 0x01000073
Qt::Key_BassUp 0x01000074
Qt::Key_BassDown 0x01000075
Qt::Key_TrebleUp 0x01000076
Qt::Key_TrebleDown 0x01000077
Qt::Key_MediaPlay 0x01000080 设置媒体播放器播放状态的键
Qt::Key_MediaStop 0x01000081 设置媒体播放器停止状态的键
Qt::Key_MediaPrevious 0x01000082
Qt::Key_MediaNext 0x01000083
Qt::Key_MediaRecord 0x01000084
Qt::Key_MediaPause 0x1000085 设置媒体播放器暂停状态的键 ( 注意 : not the pause/break key)
Qt::Key_MediaTogglePlayPause 0x1000086 A key to toggle the play/pause state in the media player (rather than setting an absolute state)
Qt::Key_HomePage 0x01000090
Qt::Key_Favorites 0x01000091
Qt::Key_Search 0x01000092
Qt::Key_Standby 0x01000093
Qt::Key_OpenUrl 0x01000094
Qt::Key_LaunchMail 0x010000a0
Qt::Key_LaunchMedia 0x010000a1
Qt::Key_Launch0 0x010000a2 On X11 this key is mapped to "My Computer" (XF86XK_MyComputer) key for legacy reasons.
Qt::Key_Launch1 0x010000a3 On X11 this key is mapped to "Calculator" (XF86XK_Calculator) key for legacy reasons.
Qt::Key_Launch2 0x010000a4 On X11 this key is mapped to XF86XK_Launch0 key for legacy reasons.
Qt::Key_Launch3 0x010000a5 On X11 this key is mapped to XF86XK_Launch1 key for legacy reasons.
Qt::Key_Launch4 0x010000a6 On X11 this key is mapped to XF86XK_Launch2 key for legacy reasons.
Qt::Key_Launch5 0x010000a7 On X11 this key is mapped to XF86XK_Launch3 key for legacy reasons.
Qt::Key_Launch6 0x010000a8 On X11 this key is mapped to XF86XK_Launch4 key for legacy reasons.
Qt::Key_Launch7 0x010000a9 On X11 this key is mapped to XF86XK_Launch5 key for legacy reasons.
Qt::Key_Launch8 0x010000aa On X11 this key is mapped to XF86XK_Launch6 key for legacy reasons.
Qt::Key_Launch9 0x010000ab On X11 this key is mapped to XF86XK_Launch7 key for legacy reasons.
Qt::Key_LaunchA 0x010000ac On X11 this key is mapped to XF86XK_Launch8 key for legacy reasons.
Qt::Key_LaunchB 0x010000ad On X11 this key is mapped to XF86XK_Launch9 key for legacy reasons.
Qt::Key_LaunchC 0x010000ae On X11 this key is mapped to XF86XK_LaunchA key for legacy reasons.
Qt::Key_LaunchD 0x010000af On X11 this key is mapped to XF86XK_LaunchB key for legacy reasons.
Qt::Key_LaunchE 0x010000b0 On X11 this key is mapped to XF86XK_LaunchC key for legacy reasons.
Qt::Key_LaunchF 0x010000b1 On X11 this key is mapped to XF86XK_LaunchD key for legacy reasons.
Qt::Key_LaunchG 0x0100010e On X11 this key is mapped to XF86XK_LaunchE key for legacy reasons.
Qt::Key_LaunchH 0x0100010f On X11 this key is mapped to XF86XK_LaunchF key for legacy reasons.
Qt::Key_MonBrightnessUp 0x010000b2
Qt::Key_MonBrightnessDown 0x010000b3
Qt::Key_KeyboardLightOnOff 0x010000b4
Qt::Key_KeyboardBrightnessUp 0x010000b5
Qt::Key_KeyboardBrightnessDown 0x010000b6
Qt::Key_PowerOff 0x010000b7
Qt::Key_WakeUp 0x010000b8
Qt::Key_Eject 0x010000b9
Qt::Key_ScreenSaver 0x010000ba
Qt::Key_WWW 0x010000bb
Qt::Key_Memo 0x010000bc
Qt::Key_LightBulb 0x010000bd
Qt::Key_Shop 0x010000be
Qt::Key_History 0x010000bf
Qt::Key_AddFavorite 0x010000c0
Qt::Key_HotLinks 0x010000c1
Qt::Key_BrightnessAdjust 0x010000c2
Qt::Key_Finance 0x010000c3
Qt::Key_Community 0x010000c4
Qt::Key_AudioRewind 0x010000c5
Qt::Key_BackForward 0x010000c6
Qt::Key_ApplicationLeft 0x010000c7
Qt::Key_ApplicationRight 0x010000c8
Qt::Key_Book 0x010000c9
Qt::Key_CD 0x010000ca
Qt::Key_Calculator 0x010000cb On X11 this key is not mapped for legacy reasons. Use Qt::Key_Launch1 instead.
Qt::Key_ToDoList 0x010000cc
Qt::Key_ClearGrab 0x010000cd
Qt::Key_Close 0x010000ce
Qt::Key_Copy 0x010000cf
Qt::Key_Cut 0x010000d0
Qt::Key_Display 0x010000d1
Qt::Key_DOS 0x010000d2
Qt::Key_Documents 0x010000d3
Qt::Key_Excel 0x010000d4
Qt::Key_Explorer 0x010000d5
Qt::Key_Game 0x010000d6
Qt::Key_Go 0x010000d7
Qt::Key_iTouch 0x010000d8
Qt::Key_LogOff 0x010000d9
Qt::Key_Market 0x010000da
Qt::Key_Meeting 0x010000db
Qt::Key_MenuKB 0x010000dc
Qt::Key_MenuPB 0x010000dd
Qt::Key_MySites 0x010000de
Qt::Key_News 0x010000df
Qt::Key_OfficeHome 0x010000e0
Qt::Key_Option 0x010000e1
Qt::Key_Paste 0x010000e2
Qt::Key_Phone 0x010000e3
Qt::Key_Calendar 0x010000e4
Qt::Key_Reply 0x010000e5
Qt::Key_Reload 0x010000e6
Qt::Key_RotateWindows 0x010000e7
Qt::Key_RotationPB 0x010000e8
Qt::Key_RotationKB 0x010000e9
Qt::Key_Save 0x010000ea
Qt::Key_Send 0x010000eb
Qt::Key_Spell 0x010000ec
Qt::Key_SplitScreen 0x010000ed
Qt::Key_Support 0x010000ee
Qt::Key_TaskPane 0x010000ef
Qt::Key_Terminal 0x010000f0
Qt::Key_Tools 0x010000f1
Qt::Key_Travel 0x010000f2
Qt::Key_Video 0x010000f3
Qt::Key_Word 0x010000f4
Qt::Key_Xfer 0x010000f5
Qt::Key_ZoomIn 0x010000f6
Qt::Key_ZoomOut 0x010000f7
Qt::Key_Away 0x010000f8
Qt::Key_Messenger 0x010000f9
Qt::Key_WebCam 0x010000fa
Qt::Key_MailForward 0x010000fb
Qt::Key_Pictures 0x010000fc
Qt::Key_Music 0x010000fd
Qt::Key_Battery 0x010000fe
Qt::Key_Bluetooth 0x010000ff
Qt::Key_WLAN 0x01000100
Qt::Key_UWB 0x01000101
Qt::Key_AudioForward 0x01000102
Qt::Key_AudioRepeat 0x01000103
Qt::Key_AudioRandomPlay 0x01000104
Qt::Key_Subtitle 0x01000105
Qt::Key_AudioCycleTrack 0x01000106
Qt::Key_Time 0x01000107
Qt::Key_Hibernate 0x01000108
Qt::Key_View 0x01000109
Qt::Key_TopMenu 0x0100010a
Qt::Key_PowerDown 0x0100010b
Qt::Key_Suspend 0x0100010c
Qt::Key_ContrastAdjust 0x0100010d
Qt::Key_TouchpadToggle 0x01000110
Qt::Key_TouchpadOn 0x01000111
Qt::Key_TouchpadOff 0x01000112
Qt::Key_MicMute 0x01000113
Qt::Key_Red 0x01000114
Qt::Key_Green 0x01000115
Qt::Key_Yellow 0x01000116
Qt::Key_Blue 0x01000117
Qt::Key_ChannelUp 0x01000118
Qt::Key_ChannelDown 0x01000119
Qt::Key_Guide 0x0100011a
Qt::Key_Info 0x0100011b
Qt::Key_Settings 0x0100011c
Qt::Key_MicVolumeUp 0x0100011d
Qt::Key_MicVolumeDown 0x0100011e
Qt::Key_New 0x01000120
Qt::Key_Open 0x01000121
Qt::Key_Find 0x01000122
Qt::Key_Undo 0x01000123
Qt::Key_Redo 0x01000124
Qt::Key_MediaLast 0x0100ffff
Qt::Key_unknown 0x01ffffff
Qt::Key_Call 0x01100004 A key to answer or initiate a call (see Qt::Key_ToggleCallHangup for a key to toggle current call state)
Qt::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.
Qt::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.
Qt::Key_Context1 0x01100000
Qt::Key_Context2 0x01100001
Qt::Key_Context3 0x01100002
Qt::Key_Context4 0x01100003
Qt::Key_Flip 0x01100006
Qt::Key_Hangup 0x01100005 A key to end an ongoing call (see Qt::Key_ToggleCallHangup for a key to toggle current call state)
Qt::Key_No 0x01010002
Qt::Key_Select 0x01010000
Qt::Key_Yes 0x01010001
Qt::Key_ToggleCallHangup 0x01100007 A key to toggle the current call state (ie. either answer, or hangup) depending on current call state
Qt::Key_VoiceDial 0x01100008
Qt::Key_LastNumberRedial 0x01100009
Qt::Key_Execute 0x01020003
Qt::Key_Printer 0x01020002
Qt::Key_Play 0x01020005
Qt::Key_Sleep 0x01020004
Qt::Key_Zoom 0x01020006
Qt::Key_Exit 0x0102000a
Qt::Key_Cancel 0x01020001

另请参阅 QKeyEvent::key ().

enum Qt:: KeyboardModifier
flags Qt:: KeyboardModifiers

此枚举描述修饰符键。

常量 描述
Qt::NoModifier 0x00000000 未按下修饰符键。
Qt::ShiftModifier 0x02000000 按下键盘 Shift 键。
Qt::ControlModifier 0x04000000 按下键盘 Ctrl 键。
Qt::AltModifier 0x08000000 按下键盘 Alt 键。
Qt::MetaModifier 0x10000000 按下键盘 Meta 键。
Qt::KeypadModifier 0x20000000 按下 Keypad (小键盘) 按钮。
Qt::GroupSwitchModifier 0x40000000 仅 X11 (除非在 Windows 上通过命令行自变量激活)。按下键盘 Mode_switch 键。

注意: On macOS ControlModifier 值相当于键盘 Command 键,和 MetaModifier 值相当于 Control 键。 KeypadModifier 值也将在按下方向键时设置,因为方向键被认为是 Keypad (小键盘) 的一部分。

注意: 在 Windows 键盘 Qt::MetaModifier 和 Qt::Key_Meta 被映射到 Windows 键。

KeyboardModifiers 类型是 typedef 对于 QFlags <KeyboardModifier>。它存储 KeyboardModifier 值的 OR 组合。

另请参阅 MouseButton and Modifier .

enum Qt:: LayoutDirection

指定 Qt 布局和文本处理的方向。

常量 描述
Qt::LeftToRight 0 从左到右布局。
Qt::RightToLeft 1 从右到左布局。
Qt::LayoutDirectionAuto 2 自动布局。

从右到左的布局对于某些语言有必要,尤其是阿拉伯语和希伯来语。

LayoutDirectionAuto 服务 2 种目的。当与 Widget 和布局结合使用时,暗示使用的布局方向设置是在父级小部件或 QApplication 。这有相同效果如 QWidget::unsetLayoutDirection ().

当 LayoutDirectionAuto 与文本布局结合使用时,暗示文本的方向是由要布局的字符串内容确定的。

另请参阅 QGuiApplication::setLayoutDirection (), QWidget::setLayoutDirection (), QTextOption::setTextDirection (),和 QString::isRightToLeft ().

enum Qt:: MaskMode

此枚举指定行为对于 QPixmap::createMaskFromColor () 和 QImage::createMaskFromColor () 函数。

常量 描述
Qt::MaskInColor 0 创建匹配给定颜色的所有像素都不透明的遮罩。
Qt::MaskOutColor 1 创建匹配给定颜色的所有像素都透明的遮罩。

enum Qt:: MatchFlag
flags Qt:: MatchFlags

此枚举描述可以使用的匹配类型,当搜索模型项时。

常量 描述
Qt::MatchExactly 0 履行 QVariant 的基匹配。
Qt::MatchFixedString 8 履行基于字符串的匹配。基于字符串的比较不区分大小写,除非 MatchCaseSensitive 标志也有指定。
Qt::MatchContains 1 搜索术语包含在项中。
Qt::MatchStartsWith 2 搜索术语匹配项开头。
Qt::MatchEndsWith 3 搜索术语匹配项末尾。
Qt::MatchCaseSensitive 16 搜索区分大小写。
Qt::MatchRegExp 4 Performs string-based matching using a regular expression as the search term.
Qt::MatchWildcard 5 使用具有通配符的字符串作为搜索术语履行基于字符串的匹配。
Qt::MatchWrap 32 履行环绕搜索,因此,当搜索到达模型中的最后项时,再次从第一个项开始,并继续直到所有项被审查。
Qt::MatchRecursive 64 搜索整个层次结构。

MatchFlags 类型是 typedef 对于 QFlags <MatchFlag>。它存储 MatchFlag 值的 OR 组合。

另请参阅 QString::compare () 和 QRegExp .

enum Qt:: Modifier

此枚举为 Qt 支持的键盘修饰符键提供更短名称。

注意: On macOS CTRL 值相当于键盘 Command 键,和 META 值相当于 Control 键。

常量 描述
Qt::SHIFT Qt::ShiftModifier 所有标准键盘都提供的 Shift 键。
Qt::META Qt::MetaModifier Meta 键。
Qt::CTRL Qt::ControlModifier Ctrl 键。
Qt::ALT Qt::AltModifier 正常 Alt 键,但不像 AltGr 键。
Qt::UNICODE_ACCEL 0x00000000 The shortcut is specified as a Unicode code point, not as a Qt Key.

另请参阅 KeyboardModifier and MouseButton .

enum Qt:: MouseButton
flags Qt:: MouseButtons

此枚举类型描述不同的鼠标按钮。

常量 描述
Qt::NoButton 0x00000000 按钮状态不引用任何按钮 (见 QMouseEvent::button ()).
Qt::AllButtons 0x07ffffff 此值相当于所有可能鼠标按钮的遮罩。用于设置 acceptedButtons 特性为 MouseArea 以接受 ALL 鼠标按钮。
Qt::LeftButton 0x00000001 左边按钮被按下,或事件引用左边按钮 (左边按钮可能是惯用左手鼠标的右边按钮)。
Qt::RightButton 0x00000002 右边按钮。
Qt::MidButton 0x00000004 中间按钮。
Qt::MiddleButton MidButton 中间按钮。
Qt::BackButton 0x00000008 后退按钮 (通常呈现在带有额外按钮的鼠标的拇指侧。这不是倾斜滚轮)。
Qt::XButton1 BackButton 后退按钮。
Qt::ExtraButton1 XButton1 后退按钮。
Qt::ForwardButton 0x00000010 前进按钮 (通常呈现在后退按钮旁边,且还通过拇指按下)。
Qt::XButton2 ForwardButton 前进按钮。
Qt::ExtraButton2 ForwardButton 前进按钮。
Qt::TaskButton 0x00000020 任务按钮。
Qt::ExtraButton3 TaskButton 任务按钮。
Qt::ExtraButton4 0x00000040 第 7 个非滚轮鼠标按钮。
Qt::ExtraButton5 0x00000080 第 8 个非滚轮鼠标按钮。
Qt::ExtraButton6 0x00000100 第 9 个非滚轮鼠标按钮。
Qt::ExtraButton7 0x00000200 第 10 个非滚轮鼠标按钮。
Qt::ExtraButton8 0x00000400 第 11 个非滚轮鼠标按钮。
Qt::ExtraButton9 0x00000800 第 12 个非滚轮鼠标按钮。
Qt::ExtraButton10 0x00001000 第 13 个非滚轮鼠标按钮。
Qt::ExtraButton11 0x00002000 第 14 个非滚轮鼠标按钮。
Qt::ExtraButton12 0x00004000 第 15 个非滚轮鼠标按钮。
Qt::ExtraButton13 0x00008000 第 16 个非滚轮鼠标按钮。
Qt::ExtraButton14 0x00010000 第 17 个非滚轮鼠标按钮。
Qt::ExtraButton15 0x00020000 第 18 个非滚轮鼠标按钮。
Qt::ExtraButton16 0x00040000 第 19 个非滚轮鼠标按钮。
Qt::ExtraButton17 0x00080000 第 20 个非滚轮鼠标按钮。
Qt::ExtraButton18 0x00100000 第 21 个非滚轮鼠标按钮。
Qt::ExtraButton19 0x00200000 第 22 个非滚轮鼠标按钮。
Qt::ExtraButton20 0x00400000 第 23 个非滚轮鼠标按钮。
Qt::ExtraButton21 0x00800000 第 24 个非滚轮鼠标按钮。
Qt::ExtraButton22 0x01000000 第 25 个非滚轮鼠标按钮。
Qt::ExtraButton23 0x02000000 第 26 个非滚轮鼠标按钮。
Qt::ExtraButton24 0x04000000 第 27 个非滚轮鼠标按钮。

注意: 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).

MouseButtons 类型是 typedef 对于 QFlags <MouseButton>。它存储 MouseButton 值的 OR 组合。

另请参阅 KeyboardModifier and Modifier .

enum Qt:: MouseEventFlag
flags Qt:: MouseEventFlags

此枚举提供的额外信息有关 QMouseEvent .

常量 描述
Qt::MouseEventCreatedDoubleClick 0x01 Indicates that Qt has created a MouseButtonDblClick event from this event. The flag is set in the causing MouseButtonPress , and not in the resulting MouseButtonDblClick .

该枚举在 Qt 5.3 引入或被修改。

MouseEventFlags 类型是 typedef 对于 QFlags <MouseEventFlag>. It stores an OR combination of MouseEventFlag values.

enum Qt:: MouseEventSource

此枚举描述鼠标事件的来源,且可以用于确定事件是否是源自其它设备 (譬如:触摸屏) 的人造鼠标事件。

常量 描述
Qt::MouseEventNotSynthesized 0 最常见值。在此类信息可用的平台,此值指示事件是为响应系统真正鼠标事件而生成的。
Qt::MouseEventSynthesizedBySystem 1 指示鼠标事件是由平台从触摸事件合成的。
Qt::MouseEventSynthesizedByQt 2 指示鼠标事件是由 Qt 从未处理触摸事件合成的。
Qt::MouseEventSynthesizedByApplication 3 指示鼠标事件是由应用程序合成的。这允许区分从某一应用程序生成的鼠标事件,是来自系统还是由 Qt 合成。该值在 Qt 5.6 引入。

该枚举在 Qt 5.3 引入或被修改。

另请参阅 Qt::AA_SynthesizeMouseForUnhandledTouchEvents .

enum Qt:: NativeGestureType

此枚举返回手势类型。

常量 描述
Qt::BeginNativeGesture 0 在手势事件流之前发送。
Qt::EndNativeGesture 1 在手势事件流之后发送。
Qt::PanNativeGesture 2 在平移手势之后发送。类似于点击并拖曳鼠标移动。
Qt::ZoomNativeGesture 3 指定放大增量 (以百分比为单位)。
Qt::SmartZoomNativeGesture 4 布尔放大状态。
Qt::RotateNativeGesture 5 旋转增量 (以度为单位)。
Qt::SwipeNativeGesture 6 在轻扫移动后发送。

该枚举在 Qt 5.2 引入或被修改。

此枚举类型描述移动聚焦的模式。

常量 描述
Qt::NavigationModeNone 0 仅用于触摸屏。
Qt::NavigationModeKeypadTabOrder 1 Qt::Key_Up and Qt::Key_Down 可用于改变焦点。
Qt::NavigationModeKeypadDirectional 2 Qt::Key_Up , Qt::Key_Down , Qt::Key_Left and Qt::Key_Right 可用于改变焦点。
Qt::NavigationModeCursorAuto 3 使用鼠标光标改变聚焦,仅显示在非触摸屏设备中。使用 Keypad (小键盘) 实现虚拟光标,除非设备拥有模拟鼠标类型的输入设备 (如:触摸板)。推荐设置这,对于需要在触摸和非触摸设备两者中进行指针控制的应用程序 (譬如 Web 浏览器) 而言。
Qt::NavigationModeCursorForceVisible 4 使用鼠标光标改变聚焦,它的显示不管设备类型。使用 Keypad (小键盘) 实现虚拟光标,除非设备拥有模拟鼠标类型的输入设备 (如:触摸板)

注意: 光标导航目前未在任何平台中实现,且行为如 NavigationModeNone。

该枚举在 Qt 4.6 引入或被修改。

另请参阅 QApplication::setNavigationMode () 和 QApplication::navigationMode ().

enum Qt:: Orientation
flags Qt:: Orientations

此类型用于表示对象的取向。

常量
Qt::Horizontal 0x1
Qt::Vertical 0x2

取向被用于 QScrollBar 例如。

取向类型是 typedef 对于 QFlags <Orientation>。它存储 Orientation 值的 OR 组合。

enum Qt:: PenCapStyle

此枚举类型定义 Qt 所支持的钢笔帽样式,即可以绘制线端帽使用 QPainter .

Qt::SquareCap Qt::FlatCap Qt::RoundCap
常量 描述
Qt::FlatCap 0x00 方形线端不覆盖线端点。
Qt::SquareCap 0x10 方形线端覆盖端点并延伸超出端点一半线宽。
Qt::RoundCap 0x20 圆形线端。

另请参阅 QPen .

enum Qt:: PenJoinStyle

此枚举类型定义 Qt 所支持的钢笔联接样式,即可以绘制 2 连接线间的联接使用 QPainter .

Qt::BevelJoin Qt::MiterJoin Qt::RoundJoin
常量 描述
Qt::MiterJoin 0x00 线外部边缘按角度延伸相交,并填充此区域。
Qt::BevelJoin 0x40 填充 2 线条之间的三角形凹槽。
Qt::RoundJoin 0x80 填充 2 条线之间的弧形。
Qt::SvgMiterJoin 0x100 斜接联接对应的斜接联接定义在 SVG 1.2 Tiny 规范。

另请参阅 QPen .

enum Qt:: PenStyle

此枚举类型定义的绘制钢笔样式可以用于 QPainter 。样式包括:

Qt::SolidLine Qt::DashLine Qt::DotLine
Qt::DashDotLine Qt::DashDotDotLine Qt::CustomDashLine
常量 描述
Qt::NoPen 0 根本没有线条。例如, QPainter::drawRect () 填充但不绘制任何边界线。
Qt::SolidLine 1 纯线条。
Qt::DashLine 2 由几像素分隔的虚线。
Qt::DotLine 3 由几像素分隔的点。
Qt::DashDotLine 4 点和虚线交替。
Qt::DashDotDotLine 5 1 虚线,2 点,1 虚线,2 点。
Qt::CustomDashLine 6 自定义模式的定义是使用 QPainterPathStroker::setDashPattern ().

另请参阅 QPen .

enum Qt:: ScreenOrientation
flags Qt:: ScreenOrientations

此枚举类型指定屏幕可能拥有的各种取向。

常量 描述
Qt::PrimaryOrientation 0x00000000 显示的首要取向。
Qt::LandscapeOrientation 0x00000002 横向取向,显示宽度大于显示高度。
Qt::PortraitOrientation 0x00000001 纵向取向,显示高度大于显示宽度,相对横向顺时针旋转 90 度。
Qt::InvertedLandscapeOrientation 0x00000008 反转横向取向,相对横向旋转 180 度。
Qt::InvertedPortraitOrientation 0x00000004 倒置纵向取向,相对纵向旋转 180 度。

ScreenOrientations 类型是 typedef 对于 QFlags <ScreenOrientation>。它存储 ScreenOrientation 值的 OR 组合。

enum Qt:: ScrollBarPolicy

此枚举类型描述各种模式为 QAbstractScrollArea 的滚动条。

常量 描述
Qt::ScrollBarAsNeeded 0 QAbstractScrollArea 展示滚动条当要拟合内容太大时,否则不展示。这为默认。
Qt::ScrollBarAlwaysOff 1 QAbstractScrollArea 从不展示滚动条。
Qt::ScrollBarAlwaysOn 2 QAbstractScrollArea 始终展示滚动条。此特性被忽略在具有瞬时滚动条的系统中 (如:从 10.7 版起的 Mac)。

(水平和垂直滚动条的模式是独立的。)

enum Qt:: ScrollPhase

此枚举描述卷动的相位。

常量 描述
Qt::NoScrollPhase 0 输入设备不支持卷动相位。该值在 Qt 5.7 引入。
Qt::ScrollBegin 1 卷动即将开始,但卷动距离尚未改变。
Qt::ScrollUpdate 2 卷动距离已改变 (默认)。
Qt::ScrollEnd 3 卷动已结束,滚动距离不再改变。
Qt::ScrollMomentum 4 用户不再触摸输入设备,但由于卷动动量而继续卷动。该值在 Qt 5.12 引入。

该枚举在 Qt 5.2 引入或被修改。

enum Qt:: ShortcutContext

对于 QEvent::Shortcut 事件发生,快捷方式的键序列必须由用户在快捷方式处于活动状态的上下文中键入。可能的上下文是这些:

常量 描述
Qt::WidgetShortcut 0 快捷方式是活动的当其父级 Widget 拥有聚焦时。
Qt::WidgetWithChildrenShortcut 3 快捷方式活动,当其父级 Widget 或其任何子级拥有聚焦时。顶层 Widget 的子级不受此快捷上下文的影响,除了弹出窗口。
Qt::WindowShortcut 1 快捷方式活动,当其父级 Widget 是活动顶层窗口的逻辑子 Widget 时。
Qt::ApplicationShortcut 2 快捷方式活动,当应用程序的某一窗口活动时。

enum Qt:: SizeHint

此枚举用于 QGraphicsLayoutItem::sizeHint ()

常量 描述
Qt::MinimumSize 0 用于指定图形布局项的最小尺寸。
Qt::PreferredSize 1 用于指定图形布局项的首选尺寸。
Qt::MaximumSize 2 用于指定图形布局项的最大尺寸。
Qt::MinimumDescent 3 用于指定图形布局项中文本字符串的最小下降。

该枚举在 Qt 4.4 引入或被修改。

另请参阅 QGraphicsLayoutItem::sizeHint ().

enum Qt:: SizeMode

此枚举用于 QPainter::drawRoundedRect () 和 QPainterPath::addRoundedRect () 函数根据指定边界矩形的尺度,指定矩形角的半径。

常量 描述
Qt::AbsoluteSize 0 使用绝对度量指定尺寸。
Qt::RelativeSize 1 指定相对于边界矩形的大小,通常使用百分比度量。

该枚举在 Qt 4.4 引入或被修改。

enum Qt:: SortOrder

此枚举描述如何排序 Widget 项。

常量 描述
Qt::AscendingOrder 0 项按升序排序,如:在 Latin-1 区域设置中以 AAA 开始以 ZZZ 结束
Qt::DescendingOrder 1 项按降序排序,如在 Latin-1 区域设置中以 ZZZ 开始以 AAA 结束

enum Qt:: TabFocusBehavior

此枚举类型为 Tab 导航提供不同聚焦行为。

常量 描述
Qt::NoTabFocus 0x00 什么都不迭代。
Qt::TabFocusTextControls 0x01 iterate text controls and widgets.
Qt::TabFocusListControls 0x02 iterate list controls and widgets.
Qt::TabFocusAllControls 0xff iterate all controls and widgets.

该枚举在 Qt 5.5 引入或被修改。

enum Qt:: TextElideMode

此枚举指定应在哪里出现省略号,当显示不拟合文本时:

常量 描述
Qt::ElideLeft 0 省略号应出现在文本开头。
Qt::ElideRight 1 省略号应出现在文本的末尾。
Qt::ElideMiddle 2 省略号应出现在文本的中间。
Qt::ElideNone 3 省略号不应出现在文本中。

Qt::ElideMiddle 通常是 URL 的最合适选择 (如 http://bugreports.qt.../QTWEBSITE-13/ ),而 Qt::ElideRight 适合其它字符串 (如 " 部署应用程序在 Ma... ").

另请参阅 QAbstractItemView::textElideMode , QFontMetrics::elidedText (), AlignmentFlag ,和 QTabBar::elideMode .

enum Qt:: TextFlag

此枚举类型用于定义一些修饰符标志。这些标志中的某些才有意义在打印上下文:

常量 描述
Qt::TextSingleLine 0x0100 将所有空白视为空格,且仅仅打印一行。
Qt::TextDontClip 0x0200 若不可能停留在给定边界内,就在外侧打印它。
Qt::TextExpandTabs 0x0400 使 U+0009 (ASCII Tab) 字符移到下一 Tab 处停止。
Qt::TextShowMnemonic 0x0800 将字符串 &P 显示成 P 对于和号,使用 &&。
Qt::TextWordWrap 0x1000 在适当位置断行,如:在单词边界。
Qt::TextWrapAnywhere 0x2000 在任何地方断行,甚至在单词内。
Qt::TextHideMnemonic 0x8000 如同 Qt::TextShowMnemonic 但不绘制下划线。
Qt::TextDontPrint 0x4000 将此文本视为被隐藏且不打印它。
Qt::TextIncludeTrailingSpaces 0x08000000 当此选项有设置时, QTextLine::naturalTextWidth () 和 QTextLine::naturalTextRect () 将返回包括文本结尾空格的宽度值;否则,排除此宽度。
Qt::TextJustificationForced 0x10000 确保文本行两端对齐。

可以使用多个修饰符标志如想要,除 Qt::TextSingleLine 和 Qt::TextWordWrap 无法组合外。

不适合给定用法的标志通常会被忽略。

enum Qt:: TextFormat

此枚举用于可以显示纯文本和富文本的 Widget,例如 QLabel 。用于决定文本字符串是否应该被解释成之一或其它。做到这通常是通过将某个枚举值传递给 QTextEdit::setTextFormat() 函数。

常量 描述
Qt::PlainText 0 文本字符串被解释成纯文本字符串。
Qt::RichText 1 文本字符串被解释成富文本字符串。见 支持的 HTML 子集 对于富文本的定义。
Qt::AutoText 2 文本字符串被解释成 Qt::RichText 若 Qt::mightBeRichText () 返回 true ,否则作为 Qt::PlainText。

enum Qt:: TextInteractionFlag
flags Qt:: TextInteractionFlags

此枚举指定文本显示 Widget,如何应答用户输入。

常量 描述
Qt::NoTextInteraction 0 不可能与文本进行交互。
Qt::TextSelectableByMouse 1 可以采用鼠标选择文本,然后使用上下文菜单 (或标准键盘快捷键) 将其拷贝到剪贴板。
Qt::TextSelectableByKeyboard 2 可以采用键盘光标键选择文本。展示文本光标。
Qt::LinksAccessibleByMouse 4 可以采用鼠标突显和激活链接。
Qt::LinksAccessibleByKeyboard 8 可以使用 Tab 聚焦链接,并采用 Enter 激活它们。
Qt::TextEditable 16 文本是完全可编辑的。
Qt::TextEditorInteraction TextSelectableByMouse | TextSelectableByKeyboard | TextEditable 默认文本编辑器。
Qt::TextBrowserInteraction TextSelectableByMouse | LinksAccessibleByMouse | LinksAccessibleByKeyboard 默认为 QTextBrowser .

TextInteractionFlags 类型是 typedef 对于 QFlags <TextInteractionFlag>。它存储 TextInteractionFlag 值的 OR 组合。

enum Qt:: TileRule

此枚举描述在绘制时如何重复或拉伸图像部分。

常量 描述
Qt::StretchTile 0 比例缩放图像以拟合可用区域。
Qt::RepeatTile 1 Repeat the image until there is no more space. May crop the last image.
Qt::RoundTile 2 Similar to Repeat, but scales the image down to ensure that the last tile is not cropped.

该枚举在 Qt 4.6 引入或被修改。

enum Qt:: TimeSpec

常量 描述
Qt::LocalTime 0 Locale dependent time (Timezones and Daylight Savings Time).
Qt::UTC 1 Coordinated Universal Time, replaces Greenwich Mean Time.
Qt::OffsetFromUTC 2 An offset in seconds from Coordinated Universal Time.
Qt::TimeZone 3 A named time zone using a specific set of Daylight Savings rules.

enum Qt:: TimerType

计时器类型指示计时器可以多精确。

常量 描述
Qt::PreciseTimer 0 精密计时器试着保持毫秒精度
Qt::CoarseTimer 1 粗糙计时器试着保持精度在 5% 的期望间隔
Qt::VeryCoarseTimer 2 非常粗糙计时器仅保持完全秒精度

On UNIX (including Linux, macOS , and iOS), Qt will keep millisecond accuracy for Qt::PreciseTimer. For Qt::CoarseTimer, the interval will be adjusted up to 5% to align the timer with other timers that are expected to fire at or around the same time. The objective is to make most timers wake up at the same time, thereby reducing CPU wakeups and power consumption.

在 Windows,Qt 将为 Qt::PreciseTimer 使用 Windows 的多媒体计时器设施 (若可用),为 Qt::CoarseTimer 和 Qt::VeryCoarseTimer 使用正常 Windows 计时器。

在所有平台,Qt::VeryCoarseTimer 间隔被四舍五入到最近完整秒 (如 23500ms 间隔将被四舍五入到 24000ms, 而 20300ms 将被四舍五入到 20000ms)。

enum Qt:: ToolBarArea
flags Qt:: ToolBarAreas

常量
Qt::LeftToolBarArea 0x1
Qt::RightToolBarArea 0x2
Qt::TopToolBarArea 0x4
Qt::BottomToolBarArea 0x8
Qt::AllToolBarAreas ToolBarArea_Mask
Qt::NoToolBarArea 0

ToolBarAreas 类型是 typedef 对于 QFlags <ToolBarArea>。它存储 ToolBarArea 值的 OR 组合。

enum Qt:: ToolButtonStyle

工具按钮的样式,描述应如何显示按钮的文本和图标。

常量 描述
Qt::ToolButtonIconOnly 0 只显示图标。
Qt::ToolButtonTextOnly 1 只显示文本。
Qt::ToolButtonTextBesideIcon 2 文本出现在图标旁边。
Qt::ToolButtonTextUnderIcon 3 文本出现在图标下方。
Qt::ToolButtonFollowStyle 4 遵循 style .

enum Qt:: TouchPointState
flags Qt:: TouchPointStates

此枚举表示触摸点的状态当 QTouchEvent 出现。

常量 描述
Qt::TouchPointPressed 0x01 触摸点现在被按下。
Qt::TouchPointMoved 0x02 触摸点移动。
Qt::TouchPointStationary 0x04 触摸点不移动。
Qt::TouchPointReleased 0x08 触摸点被释放。

该枚举在 Qt 4.6 引入或被修改。

TouchPointStates 类型是 typedef 对于 QFlags <TouchPointState>。它存储 TouchPointState 值的 OR 组合。

enum Qt:: TransformationMode

此枚举类型定义图像变换 (如比例缩放) 是否应该平滑。

常量 描述
Qt::FastTransformation 0 快速履行变换,没有平滑。
Qt::SmoothTransformation 1 使用双线性过滤,变换结果图像。

另请参阅 QImage::scaled ().

enum Qt:: UIEffect

此枚举描述可用 UI 效果。

默认情况下,Qt 将试着为每个效果使用特定平台桌面设置。使用 QApplication::setDesktopSettingsAware () 函数 (传递 false 作为自变量) 以阻止这,和 QApplication::setEffectEnabled () 以启用或禁用特定效果。

注意:所有效果被禁用,当运行在低于 16 位颜色深度的屏幕。

常量 描述
Qt::UI_AnimateMenu 1 展示动画菜单。
Qt::UI_FadeMenu 2 展示淡化菜单。
Qt::UI_AnimateCombo 3 展示动画组合框。
Qt::UI_AnimateTooltip 4 展示工具提示动画。
Qt::UI_FadeTooltip 5 展示工具提示淡化效果。
Qt::UI_AnimateToolBox 6 预留

另请参阅 QApplication::setEffectEnabled () 和 QGuiApplication::setDesktopSettingsAware ().

enum Qt:: WhiteSpaceMode

此枚举描述的空白模式类型用于 QTextDocument 类以满足不同种类正文信息的要求。

常量 描述
Qt::WhiteSpaceNormal 0 用于显示正常段落单词换行文本的空白模式。
Qt::WhiteSpacePre 1 准确重现空白的预格式化文本模式。
Qt::WhiteSpaceNoWrap 2

enum Qt:: WidgetAttribute

此枚举类型用于指定各种 Widget 属性。设置和清零属性采用 QWidget::setAttribute (),和查询采用 QWidget::testAttribute (),尽管有些拥有如下所述的特别方便功能。

常量 描述
Qt::WA_AcceptDrops 78 允许来自拖放操作的数据掉落到 Widget (见 QWidget::setAcceptDrops ()).
Qt::WA_AlwaysShowToolTips 84 为不活动窗口启用工具提示。
Qt::WA_ContentsPropagated 3 此标志多余且过时;不再有任何效果。从 Qt 4.1 起,未设置 WA_PaintOnScreen 的所有 Widget 会传播其内容。
Qt::WA_CustomWhatsThis 47 指示 Widget 想要在 What's This? 模式下继续正常运转。这由 Widget 作者设置。
Qt::WA_DeleteOnClose 55 使 Qt 删除此 Widget 当小部件接受关闭事件时 (见 QWidget::closeEvent ()).
Qt::WA_Disabled 0 指示 Widget 被禁用 (即:不接收任何鼠标/键盘事件)。还有 Getter 函数 QWidget::isEnabled ()。这由 Qt 内核设置 (或清零)。
Qt::WA_DontShowOnScreen 103 指示 Widget 被隐藏 (或不属于可查看桌面)。
Qt::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 WA_Disabled. This is set/cleared by QWidget::setEnabled () 和 QWidget::setDisabled ().
Qt::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 WA_UpdatesDisabled. This is set/cleared by QWidget::setUpdatesEnabled ().
Qt::WA_GroupLeader 72 此属性已弃用。 使用 QWidget::windowModality 代替。
Qt::WA_Hover 74 强制 Qt 生成描绘事件,当鼠标进入或离开 Widget 时。通常使用此特征,当实现自定义样式时;见 样式 范例了解细节。
Qt::WA_InputMethodEnabled 14 启用用于亚洲语言的输入法。必须设置,当创建自定义文本编辑 Widget 时。
Qt::WA_KeyboardFocusChange 77 设置顶层窗口,当用户采用键盘 (Tab、BackTab 或快捷键) 更改聚焦时。
Qt::WA_KeyCompression 33 启用键事件压缩,若设置;否则禁用,若未设置。默认情况下,键压缩是关闭的,因此每次按键 (或更多,因为自动重复通常是打开的) Widget 只接收一个键事件。若打开,而程序却跟不上键输入,Qt 可能试着去压缩键事件,以便在每个事件中可以处理多个字符。例如:单词处理程序 Widget 可能接收 2、3 或更多字符,在各 QKeyEvent::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. Qt::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.
Qt::WA_LayoutOnEntireRect 48 指示 Widget 想要 QLayout 要运转于整个 QWidget::rect (),不仅在 QWidget::contentsRect ()。这是由 Widget 作者设置的。
Qt::WA_LayoutUsesWidgetRect 92 Ignore the layout item rect from the style when laying out this widget with QLayout .
Qt::WA_MacNoClickThrough 12 此值已过时且不起作用。
Qt::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.
Qt::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 QWidget::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 .
Qt::WA_MacNormalSize 89 Indicates the widget should have the normal size for widgets in macOS . This attribute is only applicable to macOS .
Qt::WA_MacSmallSize 90 Indicates the widget should have the small size for widgets in macOS . This attribute is only applicable to macOS .
Qt::WA_MacMiniSize 91 Indicates the widget should have the mini size for widgets in macOS . This attribute is only applicable to macOS .
Qt::WA_MacVariableSize 102 Indicates the widget can choose between alternative sizes for widgets to avoid clipping. This attribute is only applicable to macOS .
Qt::WA_MacBrushedMetal 46 此值已过时且不起作用。
Qt::WA_Mapped 11 指示 Widget 已映射到屏幕。这由 Qt 内核设置/清零。
Qt::WA_MouseNoMask 71 Makes the widget receive mouse events for the entire widget regardless of the currently set mask, overriding QWidget::setMask (). This is not applicable for top-level windows.
Qt::WA_MouseTracking 2 指示 Widget 有启用鼠标追踪。见 QWidget::mouseTracking .
Qt::WA_Moved 43 指示 Widget 拥有明确位置。这的设置/清零通过 QWidget::move () 和通过 QWidget::setGeometry ().
Qt::WA_MSWindowsUseDirect3D 94 此值已过时且不起作用。
Qt::WA_NoBackground WA_OpaquePaintEvent 此值已过时。使用 WA_OpaquePaintEvent 代替。
Qt::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.
Qt::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.
Qt::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.
Qt::WA_NoMousePropagation 73 禁止将鼠标事件传播给 Widget 父级。此属性默认禁用。
Qt::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.
Qt::WA_NoSystemBackground 9 指示 Widget 没有背景 (即:当 Widget 接收描绘事件时,不自动重新绘制背景)。 注意 :不像 WA_OpaquePaintEvent,新近暴露区域 never 填充背景 (如:在首次展示窗口后,用户可以看穿它,直到应用程序处理描绘事件为止)。此标志由 Widget 作者设置或清零。
Qt::WA_OpaquePaintEvent 4 指示 Widget 描绘其所有像素,当它接收描绘事件时。因此,不需要采用 (像更新、重置尺寸、卷动及聚焦改变的) 操作擦除 Widget,在生成描绘事件之前。使用 WA_OpaquePaintEvent 提供小的优化,通过帮助缩减在不支持双缓冲的系统上的闪烁,并在描绘之前避免擦除背景必要的计算周期。 注意 :不像 WA_NoSystemBackground,WA_OpaquePaintEvent 努力避免透明窗口背景。此标志由 Widget 作者设置或清零。
Qt::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.
Qt::WA_PaintOnScreen 8 指示 Widget 想要直接绘制到屏幕中。具有此属性设置的 Widget 不参与合成管理 (即:它们不可以半透明或透过半透明重叠 Widget 照射)。 注意 :此标志只支持 X11 且禁用双缓冲。在 Qt for Embedded Linux,标志才工作当顶层 Widget 有设置且它依赖活动屏幕驱动程序的支持时。此标志由 Widget 作者设置 (或清零)。要在 Qt 描绘系统外渲染,如,若要求描绘本机图元,需要重实现 QWidget::paintEngine () 以返回 0 并设置此标志。
Qt::WA_PaintUnclipped 52 使不裁剪此 Widget 中的所有描绘器操作。此 Widget 或在其前面的其它小部件的子级不会裁剪描绘器可以在其中描绘的区域。此标志仅支持有设置 WA_PaintOnScreen 标志的 Widget。以跨平台方式做到这的首选办法,是创建位于其它 Widget 前面的透明小部件。
Qt::WA_PendingMoveEvent 34 指示移动事件待决 (如:隐藏 Widget 被移动时)。此标志由 Qt 内核设置 (或清零)。
Qt::WA_PendingResizeEvent 35 指示重置大小事件待决 (如:隐藏 Widget 被重置大小时)。此标志由 Qt 内核设置 (或清零)。
Qt::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 特性。默认情况下,有设置此属性当 Widget 类型为 Qt::Window .
Qt::WA_Resized 42 Indicates that the widget has an explicit size. This flag is set or cleared by QWidget::resize () 和 QWidget::setGeometry ().
Qt::WA_RightToLeft 56 指示 Widget 的布局方向是从右到左。
Qt::WA_SetCursor 38 指示 Widget 拥有其自己的光标。此标志的设置或清零通过 QWidget::setCursor () 和 QWidget::unsetCursor ().
Qt::WA_SetFont 37 指示 Widget 拥有其自己的字体。此标志的设置或清零通过 QWidget::setFont ().
Qt::WA_SetPalette 36 指示 Widget 拥有其自己的调色板。此标志的设置或清零通过 QWidget::setPalette ().
Qt::WA_SetStyle 86 指示 Widget 拥有其自己的样式。此标志的设置或清零通过 QWidget::setStyle ().
Qt::WA_ShowModal 70 此属性已弃用。 使用 QWidget::windowModality 代替。
Qt::WA_StaticContents 5 指示 Widget 内容西北对齐且静态。当重置大小时,这种 Widget 只接收自身新近可见部分的描绘事件。此标志由 Widget 作者设置或清零。
Qt::WA_StyleSheet 97 指示 Widget 的样式化是使用 样式表 。WA_StyleSheet 被设置每当 Widget 服从样式表时,即使样式表不影响 Widget 外观。
Qt::WA_StyleSheetTarget 131 Indicates that the widget appearance was modified by a 样式表 . WA_StyleSheet will also be set.
Qt::WA_TabletTracking 129 指示 Widget 有启用数位板追踪。见 QWidget::tabletTracking .
Qt::WA_TranslucentBackground 120 指示 Widget 应该拥有半透明背景,即:Widget 任何不透明区域会半透明,因为 Widget 将拥有 Alpha 通道。设置此标志导致要设置 WA_NoSystemBackground。在 Windows 小部件还需要 Qt::FramelessWindowHint 窗口标志被设置。此标志由 Widget 的作者设置或清零。
Qt::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, QWidget::underMouse (). This flag is set or cleared by the Qt kernel.
Qt::WA_UpdatesDisabled 10 Indicates that updates are blocked (including the system background). This flag is set or cleared by the Qt kernel. 警告 : This flag must never be set or cleared by the widget's author.
Qt::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 QWidget::setWindowModified ().
Qt::WA_WindowPropagation 80 使顶层窗口从其父级继承字体、调色板及区域设置。
Qt::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.
Qt::WA_SetLocale 87 指示区域设置应考虑 Widget 注意事项。
Qt::WA_StyledBackground 93 指示应使用样式化背景绘制 Widget。
Qt::WA_ShowWithoutActivating 98 不使之活动展示 Widget。
Qt::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 Qt::WA_DontCreateNativeAncestors is set.
Qt::WA_DontCreateNativeAncestors 101 Indicates that the widget's ancestors are kept non-native even though the widget itself is native.
Qt::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.
Qt::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.
Qt::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. 注意 : Qt automatically sets this attribute for QToolBar .
Qt::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. 注意 : Qt automatically sets this attribute for QMenu when torn-off.
Qt::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. 注意 :Qt 自动设置此属性对于 Qt::Tool 窗口类型。
Qt::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. 注意 :Qt 自动设置此属性对于 Qt::SplashScreen 窗口类型。
Qt::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. 注意 :Qt 自动设置此属性对于 Qt::Dialog and Qt::Sheet 窗口类型。
Qt::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. 注意 : Qt automatically sets this attribute for QMenu objects added to a QMenuBar .
Qt::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. 注意 : Qt automatically sets this attribute for QMenu .
Qt::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. 注意 :Qt 自动设置此属性对于 Qt::ToolTip 窗口类型。
Qt::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.
Qt::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. 注意 :Qt 自动设置此属性对于 QComboBox pop-up.
Qt::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. 注意 : Qt automatically sets this attribute on the feedback widget used during a drag.
Qt::WA_MacFrameworkScaled 117 此值已过时且不起作用。
Qt::WA_AcceptTouchEvents 121 允许触摸事件 (见 QTouchEvent ) 发送给 Widget。必须在可以处理触摸事件的所有 Widget 中设置。不设置此属性,来自触摸设备的事件将作为鼠标事件被发送。
Qt::WA_TouchPadAcceptSingleTouchEvents 123 允许将触摸板单触摸事件发送给 Widget。
Qt::WA_X11DoNotAcceptFocus 126 Asks the window manager to not give focus to this top level window. This attribute has no effect on non-X11 platforms.
Qt::WA_AlwaysStackOnTop 128 从 Qt 5.4 起,此值强制 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.
Qt::WA_ContentsMarginsRespectsSafeArea 130 A QWidget respects the safe area margins of a window by incorporating the margins into its contents' margins by default. This means, that a QLayout will use the content area of a widget for its layout, unless the Qt::WA_LayoutOnEntireRect attribute is set. This along with a contents margin of 0 can be used on the actual layout, to allow for example a background image to underlay the status bar and other system areas on an iOS device, while still allowing child widgets of that background to be inset based on the safe area.

enum Qt:: WindowFrameSection

此枚举用于描述窗口框架的各部分。它的返回是通过 QGraphicsWidget::windowFrameSectionAt () 描述窗口框架的什么部分在鼠标下。

常量
Qt::NoSection 0
Qt::LeftSection 1
Qt::TopLeftSection 2
Qt::TopSection 3
Qt::TopRightSection 4
Qt::RightSection 5
Qt::BottomRightSection 6
Qt::BottomSection 7
Qt::BottomLeftSection 8
Qt::TitleBarArea 9

该枚举在 Qt 4.4 引入或被修改。

另请参阅 QGraphicsWidget::windowFrameEvent (), QGraphicsWidget::paintWindowFrame (),和 QGraphicsWidget::windowFrameSectionAt ().

enum Qt:: WindowModality

此枚举指定模态窗口的行为。模态窗口是阻塞输入到其它窗口的一种窗口。注意:模态窗口的子级窗口不会阻塞。

值是:

常量 描述
Qt::NonModal 0 窗口非模态,且不阻塞对其它窗口的输入。
Qt::WindowModal 1 窗口对单个窗口层次结构是模态的,并阻塞其父级窗口、所有祖父级窗口,及其父级窗口和祖父级窗口的所有同级窗口的输入。
Qt::ApplicationModal 2 窗口对应用程序是模态的,且会阻塞所有窗口的输入。

另请参阅 QWidget::windowModality and QDialog .

enum Qt:: WindowState
flags Qt:: WindowStates

此枚举类型用于指定顶层窗口的当前状态。

状态是

常量 描述
Qt::WindowNoState 0x00000000 窗口未设置状态 (在正常状态)。
Qt::WindowMinimized 0x00000001 窗口被最小化 (即:图标化)。
Qt::WindowMaximized 0x00000002 最大化具有围绕它的框架的窗口。
Qt::WindowFullScreen 0x00000004 窗口填充整个屏幕,没有任何框架围绕它。
Qt::WindowActive 0x00000008 窗口是活动窗口,即:它拥有键盘聚焦。

WindowStates 类型是 typedef 对于 QFlags <WindowState>。它存储 WindowState 值的 OR 组合。

enum Qt:: WindowType
flags Qt:: WindowFlags

此枚举类型用于为 Widget 指定各种窗口系统特性。它们相当不寻常,但在某些情况下是必要的。其中一些标志从属底层窗口管理器是否支持它们。

主要类型是

常量 描述
Qt::Widget 0x00000000 这是默认类型对于 QWidget 。此类型的 Widget 为子级小部件若它们拥有父级,和为独立窗口若它们没有父级。另请参阅 Qt::Window 和 Qt::SubWindow。
Qt::Window 0x00000001 指示 Widget 通常是具有窗口系统框架和标题栏的窗口,不管小部件是否有父级。注意,不可能取消设置此标志,若 Widget 没有父级。
Qt::Dialog 0x00000002 | Window 指示 Widget 是应被装饰成对话框的窗口 (即:标题栏中通常没有最大化或最小化按钮)。这是默认类型对于 QDialog 。若想要将它用作模态对话框,发起它应该是从另一窗口,或拥有父级且使用具有 QWidget::windowModality 特性。若使之模态化,对话框将阻止应用程序的其它顶层窗口获得任何输入。拥有父级的顶层窗口称为 secondary 窗口。
Qt::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 QWidget::setWindowModality (),或 QDialog::open (),代替。
Qt::Drawer Sheet | Dialog Indicates that the widget is a drawer on macOS .
Qt::Popup 0x00000008 | Window 指示 Widget 是弹出顶层窗口 (即:它是模态的),但拥有适合弹出菜单的窗口系统框架。
Qt::Tool Popup | Dialog 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 Qt::WindowStaysOnTopHint 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 Qt::FramelessWindowHint. On macOS , tool windows correspond to the NSPanel 类对于 windows。这意味着窗口位于正常窗口之上层级,因此不可能将正常窗口放在其顶部。默认情况下,工具窗口将消失,当应用程序不活动时。可以控制这通过 Qt::WA_MacAlwaysShowToolWindow 属性。
Qt::ToolTip Popup | Sheet 指示 Widget 是工具提示。这在内部使用以实现 tooltips .
Qt::SplashScreen ToolTip | Dialog 指示窗口是闪屏。这是默认类型对于 QSplashScreen .
Qt::Desktop 0x00000010 | Window 指示此 Widget 是桌面。这是 QDesktopWidget 类型。
Qt::SubWindow 0x00000012 指示此 Widget 是子窗口,譬如 QMdiSubWindow 小部件。
Qt::ForeignWindow 0x00000020 | Window 指示此窗口对象是表示由另一进程 (或使用本机代码手动) 创建的本机平台窗口的句柄。
Qt::CoverWindow 0x00000040 | Window 指示窗口表示覆盖窗口,当在某些平台最小化应用程序时将展示此覆盖窗口。

还有很多标志可以用于定制顶层窗口外观。这些对其它窗口不起作用:

常量 描述
Qt::MSWindowsFixedSizeDialogHint 0x00000100 在 Windows 赋予窗口很薄的对话框边框。此样式传统上用于固定大小的对话框。

注意: The use of this flag is not recommended in multi-monitor environments. This is because the system will enforce that the window maintains its native size when moving it across screens. This is particularly undesirable when using monitors with different resolutions.

常量 描述
Qt::MSWindowsOwnDC 0x00000200 在 Windows 赋予窗口自身显示上下文。
Qt::BypassWindowManagerHint 0x00000400 此标志可以用于指示平台插件应禁用所有窗口管理器协议。此标志的行为会不同,从属应用程序所运行的操作系统和窗口管理器运行了什么。标志可以用于获取未配置设置的本机窗口。
Qt::X11BypassWindowManagerHint BypassWindowManagerHint 完全绕过窗口管理器。这导致根本不受管理的无边框窗口 (即,无键盘输入除非调用 QWidget::activateWindow () 手动)。
Qt::FramelessWindowHint 0x00000800 产生无边框窗口。用户无法凭借窗口系统移动无边框窗口或重置大小。在 X11,标志的结果从属窗口管理器及其理解 Motif 和/或 NETWM 提示的能力。现有的大多数现代窗口管理器都可以处理这。
Qt::NoDropShadowWindowHint 0x40000000 在支持平台禁用窗口投影。

The CustomizeWindowHint 标志用于启用窗口控件的定制。必须设置此标志以允许 WindowTitleHint , WindowSystemMenuHint , WindowMinimizeButtonHint , WindowMaximizeButtonHint and WindowCloseButtonHint 标志的改变。

常量 描述
Qt::CustomizeWindowHint 0x02000000 关闭默认窗口标题提示。
Qt::WindowTitleHint 0x00001000 赋予窗口标题栏。
Qt::WindowSystemMenuHint 0x00002000 添加窗口系统菜单,可能还有关闭按钮 (例如在 Mac)。若需要隐藏 (或展示) 关闭按钮,更可移植是使用 WindowCloseButtonHint .
Qt::WindowMinimizeButtonHint 0x00004000 添加最小化按钮。在某些平台,为了它能工作这隐含 Qt:WindowSystemMenuHint。
Qt::WindowMaximizeButtonHint 0x00008000 添加最大化按钮。在某些平台,为了它能工作这隐含 Qt:WindowSystemMenuHint。
Qt::WindowMinMaxButtonsHint WindowMinimizeButtonHint | WindowMaximizeButtonHint 添加最小化和最大化按钮。在某些平台,为了它能工作这隐含 Qt:WindowSystemMenuHint。
Qt::WindowCloseButtonHint 0x08000000 添加关闭按钮。在某些平台,为了它能工作这隐含 Qt:WindowSystemMenuHint。
Qt::WindowContextHelpButtonHint 0x00010000 将上下文帮助按钮添加到对话框。 在某些平台,为了它能工作这隐含 Qt:WindowSystemMenuHint。
Qt::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).
Qt::WindowFullscreenButtonHint 0x80000000 On macOS adds a fullscreen button.
Qt::BypassGraphicsProxyWidget 0x20000000 阻止窗口及其子级自动将自身嵌入 QGraphicsProxyWidget 若父级 Widget 已嵌入。可以设置此标志若想要 Widget 始终是桌面顶层小部件,不管父级 Widget 是否嵌入场景。
Qt::WindowShadeButtonHint 0x00020000 在最小化按钮位置添加阴影按钮,若底层窗口管理器支持。
Qt::WindowStaysOnTopHint 0x00040000 告知窗口系统窗口应停留在所有其它窗口之上。注意:在某些 X11 窗口管理器中,还必须传递 Qt::X11BypassWindowManagerHint 为此标志能正确工作。
Qt::WindowStaysOnBottomHint 0x04000000 Informs the window system that the window should stay on bottom of all other windows.

注意: 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 .

注意: 在 Windows,这仅工作于无框 (或全屏) 窗口。

常量 描述
Qt::WindowTransparentForInput 0x00080000 告知窗口系统,此窗口仅用于输出 (显示一些东西) 且不接受输入。因此,输入事件应该就像它不存在一样通过。
Qt::WindowOverridesSystemGestures 0x00100000 告知窗口系统,此窗口有实现自己的一组手势,且应禁用系统级手势 (例如:像 3 指桌面切换)。
Qt::WindowDoesNotAcceptFocus 0x00200000 告知窗口系统,此窗口不应接收输入聚焦。
Qt::MaximizeUsingFullscreenGeometryHint 0x00400000 告知窗口系统,最大化窗口时,应尽可能多地使用可用屏幕几何体,包括系统 UI 可能覆盖的区域 (譬如:状态栏或应用程序启动器)。这可能导致窗口被放置在这些系统 UI 下,但不保证,从属平台是否支持。启用标志时,用户负责考虑 QScreen::availableGeometry (),以便要求用户交互的应用程序的任何 UI 元素都不会被系统 UI 覆盖。
Qt::WindowType_Mask 0x000000ff 用于提取窗口标志的窗口类型部分的掩码。

WindowFlags 类型是 typedef 对于 QFlags <WindowType>。它存储 WindowType 值的 OR 组合。

另请参阅 QWidget::windowFlags and 窗口标志范例 .

函数文档编制

QFlags < KeyboardModifiers::enum_type > Qt:: operator| ( KeyboardModifiers::enum_type f1 , KeyboardModifiers::enum_type f2 )

QFlags < KeyboardModifiers::enum_type > Qt:: operator| ( KeyboardModifiers::enum_type f1 , QFlags < KeyboardModifiers::enum_type > f2 )

QFlags < InputMethodHints::enum_type > Qt:: operator| ( InputMethodHints::enum_type f1 , InputMethodHints::enum_type f2 )

QFlags < InputMethodHints::enum_type > Qt:: operator| ( InputMethodHints::enum_type f1 , QFlags < InputMethodHints::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( InputMethodHints::enum_type f1 , int f2 )

QFlags < DropActions::enum_type > Qt:: operator| ( DropActions::enum_type f1 , DropActions::enum_type f2 )

QFlags < DropActions::enum_type > Qt:: operator| ( DropActions::enum_type f1 , QFlags < DropActions::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( DropActions::enum_type f1 , int f2 )

QFlags < ItemFlags::enum_type > Qt:: operator| ( ItemFlags::enum_type f1 , ItemFlags::enum_type f2 )

QFlags < ItemFlags::enum_type > Qt:: operator| ( ItemFlags::enum_type f1 , QFlags < ItemFlags::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( ItemFlags::enum_type f1 , int f2 )

QFlags < MatchFlags::enum_type > Qt:: operator| ( MatchFlags::enum_type f1 , MatchFlags::enum_type f2 )

QFlags < MatchFlags::enum_type > Qt:: operator| ( MatchFlags::enum_type f1 , QFlags < MatchFlags::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( MatchFlags::enum_type f1 , int f2 )

QFlags < TextInteractionFlags::enum_type > Qt:: operator| ( TextInteractionFlags::enum_type f1 , TextInteractionFlags::enum_type f2 )

QFlags < TextInteractionFlags::enum_type > Qt:: operator| ( TextInteractionFlags::enum_type f1 , QFlags < TextInteractionFlags::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( TextInteractionFlags::enum_type f1 , int f2 )

QFlags < TouchPointStates::enum_type > Qt:: operator| ( TouchPointStates::enum_type f1 , TouchPointStates::enum_type f2 )

QFlags < TouchPointStates::enum_type > Qt:: operator| ( TouchPointStates::enum_type f1 , QFlags < TouchPointStates::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( TouchPointStates::enum_type f1 , int f2 )

QFlags < GestureFlags::enum_type > Qt:: operator| ( GestureFlags::enum_type f1 , GestureFlags::enum_type f2 )

QFlags < GestureFlags::enum_type > Qt:: operator| ( GestureFlags::enum_type f1 , QFlags < GestureFlags::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( GestureFlags::enum_type f1 , int f2 )

QFlags < MouseEventFlags::enum_type > Qt:: operator| ( MouseEventFlags::enum_type f1 , MouseEventFlags::enum_type f2 )

QFlags < MouseEventFlags::enum_type > Qt:: operator| ( MouseEventFlags::enum_type f1 , QFlags < MouseEventFlags::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( MouseEventFlags::enum_type f1 , int f2 )

int Qt:: operator| ( int , int )

QIncompatibleFlag Qt:: operator| ( KeyboardModifiers::enum_type f1 , int f2 )

QFlags < MouseButtons::enum_type > Qt:: operator| ( MouseButtons::enum_type f1 , MouseButtons::enum_type f2 )

QFlags < MouseButtons::enum_type > Qt:: operator| ( MouseButtons::enum_type f1 , QFlags < MouseButtons::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( MouseButtons::enum_type f1 , int f2 )

QFlags < Orientations::enum_type > Qt:: operator| ( Orientations::enum_type f1 , Orientations::enum_type f2 )

QFlags < Orientations::enum_type > Qt:: operator| ( Orientations::enum_type f1 , QFlags < Orientations::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( Orientations::enum_type f1 , int f2 )

QFlags < Alignment::enum_type > Qt:: operator| ( Alignment::enum_type f1 , Alignment::enum_type f2 )

QFlags < Alignment::enum_type > Qt:: operator| ( Alignment::enum_type f1 , QFlags < Alignment::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( Alignment::enum_type f1 , int f2 )

QFlags < WindowFlags::enum_type > Qt:: operator| ( WindowFlags::enum_type f1 , WindowFlags::enum_type f2 )

QFlags < WindowFlags::enum_type > Qt:: operator| ( WindowFlags::enum_type f1 , QFlags < WindowFlags::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( WindowFlags::enum_type f1 , int f2 )

QFlags < WindowStates::enum_type > Qt:: operator| ( WindowStates::enum_type f1 , WindowStates::enum_type f2 )

QFlags < WindowStates::enum_type > Qt:: operator| ( WindowStates::enum_type f1 , QFlags < WindowStates::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( WindowStates::enum_type f1 , int f2 )

QFlags < ScreenOrientations::enum_type > Qt:: operator| ( ScreenOrientations::enum_type f1 , ScreenOrientations::enum_type f2 )

QFlags < ScreenOrientations::enum_type > Qt:: operator| ( ScreenOrientations::enum_type f1 , QFlags < ScreenOrientations::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( ScreenOrientations::enum_type f1 , int f2 )

QFlags < ImageConversionFlags::enum_type > Qt:: operator| ( ImageConversionFlags::enum_type f1 , ImageConversionFlags::enum_type f2 )

QFlags < ImageConversionFlags::enum_type > Qt:: operator| ( ImageConversionFlags::enum_type f1 , QFlags < ImageConversionFlags::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( ImageConversionFlags::enum_type f1 , int f2 )

QFlags < DockWidgetAreas::enum_type > Qt:: operator| ( DockWidgetAreas::enum_type f1 , DockWidgetAreas::enum_type f2 )

QFlags < DockWidgetAreas::enum_type > Qt:: operator| ( DockWidgetAreas::enum_type f1 , QFlags < DockWidgetAreas::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( DockWidgetAreas::enum_type f1 , int f2 )

QFlags < ToolBarAreas::enum_type > Qt:: operator| ( ToolBarAreas::enum_type f1 , ToolBarAreas::enum_type f2 )

QFlags < ToolBarAreas::enum_type > Qt:: operator| ( ToolBarAreas::enum_type f1 , QFlags < ToolBarAreas::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( ToolBarAreas::enum_type f1 , int f2 )

QFlags < Edges::enum_type > Qt:: operator| ( Edges::enum_type f1 , Edges::enum_type f2 )

QFlags < Edges::enum_type > Qt:: operator| ( Edges::enum_type f1 , QFlags < Edges::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( Edges::enum_type f1 , int f2 )

QFlags < InputMethodQueries::enum_type > Qt:: operator| ( InputMethodQueries::enum_type f1 , InputMethodQueries::enum_type f2 )

QFlags < InputMethodQueries::enum_type > Qt:: operator| ( InputMethodQueries::enum_type f1 , QFlags < InputMethodQueries::enum_type > f2 )

QIncompatibleFlag Qt:: operator| ( InputMethodQueries::enum_type f1 , int f2 )