Qt Namespace Reference |
flags | Alignment |
enum | AlignmentFlag { AlignLeft, AlignRight, AlignHCenter, AlignJustify, ..., AlignVertical_Mask } |
enum | AnchorAttribute { AnchorName, AnchorHref } |
enum | AnchorPoint { AnchorLeft, AnchorHorizontalCenter, AnchorRight, AnchorTop, AnchorVerticalCenter, AnchorBottom } |
enum | ApplicationAttribute { AA_ImmediateWidgetCreation, AA_MSWindowsUseDirect3DByDefault, AA_DontShowIconsInMenus, AA_NativeWindows, ..., AA_S60DontConstructApplicationPanes } |
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 | ClipOperation { NoClip, ReplaceClip, IntersectClip, UniteClip } |
enum | ConnectionType { AutoConnection, DirectConnection, QueuedConnection, BlockingQueuedConnection, UniqueConnection, AutoCompatConnection } |
enum | ContextMenuPolicy { NoContextMenu, PreventContextMenu, DefaultContextMenu, ActionsContextMenu, CustomContextMenu } |
enum | CoordinateSystem { DeviceCoordinates, LogicalCoordinates } |
enum | Corner { TopLeftCorner, TopRightCorner, BottomLeftCorner, BottomRightCorner } |
enum | CursorShape { ArrowCursor, UpArrowCursor, CrossCursor, WaitCursor, ..., BitmapCursor } |
enum | DateFormat { TextDate, ISODate, SystemLocaleShortDate, SystemLocaleLongDate, ..., LocalDate } |
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 | EventPriority { HighEventPriority, NormalEventPriority, LowEventPriority } |
enum | FillRule { OddEvenFill, WindingFill } |
enum | FocusPolicy { TabFocus, ClickFocus, StrongFocus, WheelFocus, NoFocus } |
enum | FocusReason { MouseFocusReason, TabFocusReason, BacktabFocusReason, ActiveWindowFocusReason, ..., OtherFocusReason } |
enum | GestureFlag { DontStartGestureOnChildren, ReceivePartialGestures } |
flags | GestureFlags |
enum | GestureState { 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, ..., NoOpaqueDetection } |
flags | ImageConversionFlags |
enum | InputMethodHint { ImhNone, ImhHiddenText, ImhNoAutoUppercase, ImhPreferNumbers, ..., ImhExclusiveInputMask } |
flags | InputMethodHints |
enum | InputMethodQuery { ImMicroFocus, ImFont, ImCursorPosition, ImSurroundingText, ..., ImAnchorPosition } |
enum | ItemDataRole { DisplayRole, DecorationRole, EditRole, ToolTipRole, ..., UserRole } |
enum | ItemFlag { NoItemFlags, ItemIsSelectable, ItemIsEditable, ItemIsDragEnabled, ..., ItemIsTristate } |
flags | ItemFlags |
enum | ItemSelectionMode { ContainsItemShape, IntersectsItemShape, ContainsItemBoundingRect, IntersectsItemBoundingRect } |
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 } |
enum | MaskMode { MaskInColor, MaskOutColor } |
enum | MatchFlag { MatchExactly, MatchFixedString, MatchContains, MatchStartsWith, ..., MatchRecursive } |
flags | MatchFlags |
enum | Modifier { SHIFT, META, CTRL, ALT, UNICODE_ACCEL } |
enum | MouseButton { NoButton, LeftButton, RightButton, MidButton, XButton1, XButton2 } |
flags | MouseButtons |
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 | ScrollBarPolicy { ScrollBarAsNeeded, ScrollBarAlwaysOff, ScrollBarAlwaysOn } |
enum | ShortcutContext { WidgetShortcut, WidgetWithChildrenShortcut, WindowShortcut, ApplicationShortcut } |
enum | SizeHint { MinimumSize, PreferredSize, MaximumSize, MinimumDescent } |
enum | SizeMode { AbsoluteSize, RelativeSize } |
enum | SortOrder { AscendingOrder, DescendingOrder } |
enum | TextElideMode { ElideLeft, ElideRight, ElideMiddle, ElideNone } |
enum | TextFlag { TextSingleLine, TextDontClip, TextExpandTabs, TextShowMnemonic, ..., TextJustificationForced } |
enum | TextFormat { PlainText, RichText, AutoText, LogText } |
enum | TextInteractionFlag { NoTextInteraction, TextSelectableByMouse, TextSelectableByKeyboard, LinksAccessibleByMouse, ..., TextBrowserInteraction } |
flags | TextInteractionFlags |
enum | TileRule { StretchTile, RepeatTile, RoundTile } |
enum | TimeSpec { LocalTime, UTC, OffsetFromUTC } |
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 } |
typedef | WFlags |
enum | WhiteSpaceMode { WhiteSpaceNormal, WhiteSpacePre, WhiteSpaceNoWrap } |
enum | WidgetAttribute { WA_AcceptDrops, WA_AlwaysShowToolTips, WA_ContentsPropagated, WA_CustomWhatsThis, ..., WA_MergeSoftkeysRecursively } |
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, ..., WMacNoSheet } |
QString | convertFromPlainText ( const QString & plain, WhiteSpaceMode mode = WhiteSpacePre ) |
QString | escape ( const QString & plain ) |
bool | mightBeRichText ( const QString & text ) |
The Qt namespace contains miscellaneous identifiers used throughout the Qt library.
This enum type is used to describe alignment. It contains horizontal and vertical flags that can be combined to produce the required effect.
The TextElideMode enum can also be used in many situations to fine-tune the appearance of aligned text.
The horizontal flags are:
Constant | Value | Description |
---|---|---|
Qt::AlignLeft | 0x0001 | Aligns with the left edge. |
Qt::AlignRight | 0x0002 | Aligns with the right edge. |
Qt::AlignHCenter | 0x0004 | Centers horizontally in the available space. |
Qt::AlignJustify | 0x0008 | Justifies the text in the available space. |
The vertical flags are:
Constant | Value | Description |
---|---|---|
Qt::AlignTop | 0x0020 | Aligns with the top. |
Qt::AlignBottom | 0x0040 | Aligns with the bottom. |
Qt::AlignVCenter | 0x0080 | Centers vertically in the available space. |
You can use only one of the horizontal flags at a time. There is one two-dimensional flag:
Constant | Value | Description |
---|---|---|
Qt::AlignCenter | AlignVCenter | AlignHCenter | Centers in both dimensions. |
You can use at most one horizontal and one vertical flag at a time. Qt::AlignCenter counts as both horizontal and vertical.
Three enum values are useful in applications that can be run in right-to-left mode:
Constant | Value | Description |
---|---|---|
Qt::AlignAbsolute | 0x0010 | If the widget's layout direction is Qt::RightToLeft (instead of Qt::LeftToRight, the default), Qt::AlignLeft refers to the right edge and Qt::AlignRight to the left edge. This is normally the desired behavior. If you want Qt::AlignLeft to always mean "left" and Qt::AlignRight to always mean "right", combine the flag with Qt::AlignAbsolute. |
Qt::AlignLeading | AlignLeft | Synonym for Qt::AlignLeft. |
Qt::AlignTrailing | AlignRight | Synonym for Qt::AlignRight. |
Masks:
Constant | Value |
---|---|
Qt::AlignHorizontal_Mask | AlignLeft | AlignRight | AlignHCenter | AlignJustify | AlignAbsolute |
Qt::AlignVertical_Mask | AlignTop | AlignBottom | AlignVCenter |
Conflicting combinations of flags have undefined meanings.
The Alignment type is a typedef for QFlags<AlignmentFlag>. It stores an OR combination of AlignmentFlag values.
An anchor has one or more of the following attributes:
Constant | Value | Description |
---|---|---|
Qt::AnchorName | 0 | the name attribute of the anchor. This attribute is used when scrolling to an anchor in the document. |
Qt::AnchorHref | 1 | the href attribute of the anchor. This attribute is used when a link is clicked to determine what content to load. |
Specifies a side of a layout item that can be anchored. This is used by QGraphicsAnchorLayout.
Constant | Value | Description |
---|---|---|
Qt::AnchorLeft | 0 | The left side of a layout item. |
Qt::AnchorHorizontalCenter | 1 | A "virtual" side that is centered between the left and the right side of a layout item. |
Qt::AnchorRight | 2 | The right side of a layout item. |
Qt::AnchorTop | 3 | The top side of a layout item. |
Qt::AnchorVerticalCenter | 4 | A "virtual" side that is centered between the top and the bottom side of a layout item. |
Qt::AnchorBottom | 5 | The bottom side of a layout item. |
See also QGraphicsAnchorLayout.
This enum describes attributes that change the behavior of application-wide features. These are enabled and disabled using QCoreApplication::setAttribute(), and can be tested for with QCoreApplication::testAttribute().
Constant | Value | Description |
---|---|---|
Qt::AA_ImmediateWidgetCreation | 0 | 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_MSWindowsUseDirect3DByDefault | 1 | This value is obsolete and has no effect. |
Qt::AA_DontShowIconsInMenus | 2 | Actions with the Icon property won't be shown in any menus unless specifically set by the QAction::iconVisibleInMenu property. Menus that are currently open or menus already created in the native Mac OS X menubar may not pick up a change in this attribute. Changes in the QAction::iconVisibleInMenu property will always be picked up. |
Qt::AA_NativeWindows | 3 | Ensures that widgets have native windows. |
Qt::AA_DontCreateNativeWidgetSiblings | 4 | Ensures that siblings of native widgets stay non-native unless specifically set by the Qt::WA_NativeWindow attribute. |
Qt::AA_MacPluginApplication | 5 | Stops the Qt mac application from doing specific initializations that do not necessarily make sense when using Qt to author a plugin. This includes avoiding loading our nib for the main menu and not taking possession of the native menu bar. When setting this attribute to true will also set the AA_DontUseNativeMenuBar attribute to true. |
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 Mac OS X or at the bottom in Windows CE). |
Qt::AA_MacDontSwapCtrlAndMeta | 7 | On Mac OS X 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::StandardShortcuts 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(QKeySequence::PortableText) will be different). |
Qt::AA_S60DontConstructApplicationPanes | 8 | Stops Qt from initializing the S60 status pane and softkey pane on Symbian. This is useful to save memory and reduce startup time for applications that will run in fullscreen mode during their whole lifetime. This attribute must be set before QApplication is constructed. |
Constant | Value |
---|---|
Qt::NoArrow | 0 |
Qt::UpArrow | 1 |
Qt::DownArrow | 2 |
Qt::LeftArrow | 3 |
Qt::RightArrow | 4 |
This enum type defines what happens to the aspect ratio when scaling an rectangle.
Constant | Value | Description |
---|---|---|
Qt::IgnoreAspectRatio | 0 | The size is scaled freely. The aspect ratio is not preserved. |
Qt::KeepAspectRatio | 1 | The size is scaled to a rectangle as large as possible inside a given rectangle, preserving the aspect ratio. |
Qt::KeepAspectRatioByExpanding | 2 | The size is scaled to a rectangle as small as possible outside a given rectangle, preserving the aspect ratio. |
See also QSize::scale() and QImage::scaled().
This enum type defines three values to represent the three axes in the cartesian coordinate system.
Constant | Value | Description |
---|---|---|
Qt::XAxis | 0 | The X axis. |
Qt::YAxis | 1 | The Y axis. |
Qt::ZAxis | 2 | The Z axis. |
See also QTransform::rotate() and QTransform::rotateRadians().
Background mode:
Constant | Value |
---|---|
Qt::TransparentMode | 0 |
Qt::OpaqueMode | 1 |
This enum type defines the brush styles supported by Qt, i.e. the fill pattern of shapes drawn using QPainter.
Constant | Value | Description |
---|---|---|
Qt::NoBrush | 0 | No brush pattern. |
Qt::SolidPattern | 1 | Uniform color. |
Qt::Dense1Pattern | 2 | Extremely dense brush pattern. |
Qt::Dense2Pattern | 3 | Very dense brush pattern. |
Qt::Dense3Pattern | 4 | Somewhat dense brush pattern. |
Qt::Dense4Pattern | 5 | Half dense brush pattern. |
Qt::Dense5Pattern | 6 | Somewhat sparse brush pattern. |
Qt::Dense6Pattern | 7 | Very sparse brush pattern. |
Qt::Dense7Pattern | 8 | Extremely sparse brush pattern. |
Qt::HorPattern | 9 | Horizontal lines. |
Qt::VerPattern | 10 | Vertical lines. |
Qt::CrossPattern | 11 | Crossing horizontal and vertical lines. |
Qt::BDiagPattern | 12 | Backward diagonal lines. |
Qt::FDiagPattern | 13 | Forward diagonal lines. |
Qt::DiagCrossPattern | 14 | Crossing diagonal lines. |
Qt::LinearGradientPattern | 15 | Linear gradient (set using a dedicated QBrush constructor). |
Qt::ConicalGradientPattern | 17 | Conical gradient (set using a dedicated QBrush constructor). |
Qt::RadialGradientPattern | 16 | Radial gradient (set using a dedicated QBrush constructor). |
Qt::TexturePattern | 24 | Custom pattern (see QBrush::setTexture()). |
See also QBrush.
Constant | Value |
---|---|
Qt::CaseInsensitive | 0 |
Qt::CaseSensitive | 1 |
This enum describes the state of checkable items, controls, and widgets.
Constant | Value | Description |
---|---|---|
Qt::Unchecked | 0 | The item is unchecked. |
Qt::PartiallyChecked | 1 | The item is partially checked. Items in hierarchical models may be partially checked if some, but not all, of their children are checked. |
Qt::Checked | 2 | The item is checked. |
See also QCheckBox, Qt::ItemFlags, and Qt::ItemDataRole.
Constant | Value | Description |
---|---|---|
Qt::NoClip | 0 | This operation turns clipping off. |
Qt::ReplaceClip | 1 | Replaces the current clip path/rect/region with the one supplied in the function call. |
Qt::IntersectClip | 2 | Intersects the current clip path/rect/region with the one supplied in the function call. |
Qt::UniteClip | 3 | Unites the current clip path/rect/region with the one supplied in the function call. |
This enum describes the types of connection that can be used between signals and slots. In particular, it determines whether a particular signal is delivered to a slot immediately or queued for delivery at a later time.
Constant | Value | Description |
---|---|---|
Qt::AutoConnection | 0 | (default) Same as DirectConnection, if the emitter and receiver are in the same thread. Same as QueuedConnection, if the emitter and receiver are in different threads. |
Qt::DirectConnection | 1 | The slot is invoked immediately, when the signal is emitted. |
Qt::QueuedConnection | 2 | The slot is invoked when control returns to the event loop of the receiver's thread. The slot is executed in the receiver's thread. |
Qt::BlockingQueuedConnection | 4 | Same as QueuedConnection, except the current thread blocks until the slot returns. This connection type should only be used where the emitter and receiver are in different threads. Note: Violating this rule can cause your application to deadlock. |
Qt::UniqueConnection | 0x80 | Same as AutoConnection, but the connection is made only if it does not duplicate an existing connection. i.e., if the same signal is already connected to the same slot for the same pair of objects, then the connection will fail. This connection type was introduced in Qt 4.6. |
Qt::AutoCompatConnection | 3 | The default type when Qt 3 support is enabled. Same as AutoConnection but will also cause warnings to be output in certain situations. See Compatibility Signals and Slots for further information. |
With queued connections, the parameters must be of types that are known to Qt's meta-object system, because Qt needs to copy the arguments to store them in an event behind the scenes. If you try to use a queued connection and get the error message:
QObject::connect: Cannot queue arguments of type 'MyType'
Call qRegisterMetaType() to register the data type before you establish the connection.
When using signals and slots with multiple threads, see Signals and Slots Across Threads.
See also Thread Support in Qt, QObject::connect(), and qRegisterMetaType().
This enum type defines the various policies a widget can have with respect to showing a context menu.
Constant | Value | Description |
---|---|---|
Qt::NoContextMenu | 0 | the widget does not feature a context menu, context menu handling is deferred to the widget's parent. |
Qt::PreventContextMenu | 4 | the widget does not feature a context menu, and in contrast to NoContextMenu, the handling is not deferred to the widget's parent. This means that all right mouse button events are guaranteed to be delivered to the widget itself through mousePressEvent(), and mouseReleaseEvent(). |
Qt::DefaultContextMenu | 1 | the widget's QWidget::contextMenuEvent() handler is called. |
Qt::ActionsContextMenu | 2 | the widget displays its QWidget::actions() as context menu. |
Qt::CustomContextMenu | 3 | the widget emits the QWidget::customContextMenuRequested() signal. |
This enum specifies the coordinate system.
Constant | Value | Description |
---|---|---|
Qt::DeviceCoordinates | 0 | Coordinates are relative to the upper-left corner of the object's paint device. |
Qt::LogicalCoordinates | 1 | Coordinates are relative to the upper-left corner of the object. |
This enum was introduced in Qt 4.6.
This enum type specifies a corner in a rectangle:
Constant | Value | Description |
---|---|---|
Qt::TopLeftCorner | 0x00000 | The top-left corner of the rectangle. |
Qt::TopRightCorner | 0x00001 | The top-right corner of the rectangle. |
Qt::BottomLeftCorner | 0x00002 | The bottom-left corner of the rectangle. |
Qt::BottomRightCorner | 0x00003 | The bottom-right corner of the rectangle. |
This enum type defines the various cursors that can be used.
The standard arrow cursor is the default for widgets in a normal state.
Constant | Value | Description |
---|---|---|
Qt::ArrowCursor | 0 | The standard arrow cursor. |
Qt::UpArrowCursor | 1 | An arrow pointing upwards toward the top of the screen. |
Qt::CrossCursor | 2 | A crosshair cursor, typically used to help the user accurately select a point on the screen. |
Qt::WaitCursor | 3 | An hourglass or watch cursor, usually shown during operations that prevent the user from interacting with the application. |
Qt::IBeamCursor | 4 | A caret or ibeam cursor, indicating that a widget can accept and display text input. |
Qt::SizeVerCursor | 5 | A cursor used for elements that are used to vertically resize top-level windows. |
Qt::SizeHorCursor | 6 | A cursor used for elements that are used to horizontally resize top-level windows. |
Qt::SizeBDiagCursor | 7 | A cursor used for elements that are used to diagonally resize top-level windows at their top-right and bottom-left corners. |
Qt::SizeFDiagCursor | 8 | A cursor used for elements that are used to diagonally resize top-level windows at their top-left and bottom-right corners. |
Qt::SizeAllCursor | 9 | A cursor used for elements that are used to resize top-level windows in any direction. |
Qt::BlankCursor | 10 | A blank/invisible cursor, typically used when the cursor shape needs to be hidden. |
Qt::SplitVCursor | 11 | A cursor used for vertical splitters, indicating that a handle can be dragged horizontally to adjust the use of available space. |
Qt::SplitHCursor | 12 | A cursor used for horizontal splitters, indicating that a handle can be dragged vertically to adjust the use of available space. |
Qt::PointingHandCursor | 13 | A pointing hand cursor that is typically used for clickable elements such as hyperlinks. |
Qt::ForbiddenCursor | 14 | A slashed circle cursor, typically used during drag and drop operations to indicate that dragged content cannot be dropped on particular widgets or inside certain regions. |
Qt::OpenHandCursor | 17 | A cursor representing an open hand, typically used to indicate that the area under the cursor is the visible part of a canvas that the user can click and drag in order to scroll around. |
Qt::ClosedHandCursor | 18 | A cursor representing a closed hand, typically used to indicate that a dragging operation is in progress that involves scrolling. |
Qt::WhatsThisCursor | 15 | An arrow with a question mark, typically used to indicate the presence of What's This? help for a widget. |
Qt::BusyCursor | 16 | An hourglass or watch cursor, usually shown during operations that allow the user to interact with the application while they are performed in the background. |
Qt::BitmapCursor | 24 |
Constant | Value | Description |
---|---|---|
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() for more information. |
Qt::ISODate | 1 | ISO 8601 extended format: either YYYY-MM-DD for dates or YYYY-MM-DDTHH:MM:SS for combined dates and times. |
Qt::SystemLocaleShortDate | ? | The short format used by the operating system. |
Qt::SystemLocaleLongDate | ? | The long format used by the operating system. |
Qt::DefaultLocaleShortDate | ? | The short format specified by the application's locale. |
Qt::DefaultLocaleLongDate | ? | The long format used by the application's locale. |
Qt::SystemLocaleDate | 2 | This enum value is deprecated. Use Qt::SystemLocaleShortDate instead (or Qt::SystemLocaleLongDate if you want long dates). |
Qt::LocaleDate | ? | This enum value is deprecated. Use Qt::DefaultLocaleShortDate instead (or Qt::DefaultLocaleLongDate if you want long dates). |
Qt::LocalDate | SystemLocaleDate | This enum value is deprecated. Use Qt::SystemLocaleShortDate instead (or Qt::SystemLocaleLongDate if you want long dates). |
Note: For ISODate formats, each 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.
Constant | Value |
---|---|
Qt::Monday | 1 |
Qt::Tuesday | 2 |
Qt::Wednesday | 3 |
Qt::Thursday | 4 |
Qt::Friday | 5 |
Qt::Saturday | 6 |
Qt::Sunday | 7 |
Constant | Value |
---|---|
Qt::LeftDockWidgetArea | 0x1 |
Qt::RightDockWidgetArea | 0x2 |
Qt::TopDockWidgetArea | 0x4 |
Qt::BottomDockWidgetArea | 0x8 |
Qt::AllDockWidgetAreas | DockWidgetArea_Mask |
Qt::NoDockWidgetArea | 0 |
The DockWidgetAreas type is a typedef for QFlags<DockWidgetArea>. It stores an OR combination of DockWidgetArea values.
Constant | Value | Description |
---|---|---|
Qt::CopyAction | 0x1 | Copy the data to the target. |
Qt::MoveAction | 0x2 | Move the data from the source to the target. |
Qt::LinkAction | 0x4 | Create a link from the source to the target. |
Qt::ActionMask | 0xff | |
Qt::IgnoreAction | 0x0 | Ignore the action (do nothing with the data). |
Qt::TargetMoveAction | 0x8002 | On Windows, this value is used when the ownership of the D&D data should be taken over by the target application, i.e., the source application should not delete the data. On X11 this value is used to do a move. TargetMoveAction is not used on the Mac. |
The DropActions type is a typedef for QFlags<DropAction>. It stores an OR combination of DropAction values.
This enum can be used to specify event priorities.
Constant | Value | Description |
---|---|---|
Qt::HighEventPriority | 1 | Events with this priority are sent before events with NormalEventPriority or LowEventPriority. |
Qt::NormalEventPriority | 0 | Events with this priority are sent after events with HighEventPriority, but before events with LowEventPriority. |
Qt::LowEventPriority | -1 | Events with this priority are sent after events with HighEventPriority or NormalEventPriority. |
Note that these values are provided purely for convenience, since event priorities can be any value between INT_MAX and INT_MIN, inclusive. For example, you can define custom priorities as being relative to each other:
enum CustomEventPriority { // An important event ImportantEventPriority = Qt::HighEventPriority, // A more important event MoreImportantEventPriority = ImportantEventPriority + 1, // A critical event CriticalEventPriority = 100 * MoreImportantEventPriority, // Not that important StatusEventPriority = Qt::LowEventPriority, // These are less important than Status events IdleProcessingDoneEventPriority = StatusEventPriority - 1 };
See also QCoreApplication::postEvent().
Specifies which method should be used to fill the paths and polygons.
Constant | Value | Description |
---|---|---|
Qt::OddEvenFill | 0 | Specifies that the region is filled using the odd even fill rule. With this rule, we determine whether a point is inside the shape by using the following method. Draw a horizontal line from the point to a location outside the shape, and count the number of intersections. If the number of intersections is an odd number, the point is inside the shape. This mode is the default. |
Qt::WindingFill | 1 | Specifies that the region is filled using the non zero winding rule. With this rule, we determine whether a point is inside the shape by using the following method. Draw a horizontal line from the point to a location outside the shape. Determine whether the direction of the line at each intersection point is up or down. The winding number is determined by summing the direction of each intersection. If the number is non zero, the point is inside the shape. This fill mode can also in most cases be considered as the intersection of closed shapes. |
This enum type defines the various policies a widget can have with respect to acquiring keyboard focus.
Constant | Value | Description |
---|---|---|
Qt::TabFocus | 0x1 | the widget accepts focus by tabbing. |
Qt::ClickFocus | 0x2 | the widget accepts focus by clicking. |
Qt::StrongFocus | TabFocus | ClickFocus | 0x8 | the widget accepts focus by both tabbing and clicking. On Mac OS X this will also be indicate that the widget accepts tab focus when in 'Text/List focus mode'. |
Qt::WheelFocus | StrongFocus | 0x4 | like Qt::StrongFocus plus the widget accepts focus by using the mouse wheel. |
Qt::NoFocus | 0 | the widget does not accept focus. |
This enum specifies why the focus changed. It will be passed through QWidget::setFocus and can be retrieved in the QFocusEvent sent to the widget upon focus change.
Constant | Value | Description |
---|---|---|
Qt::MouseFocusReason | 0 | A mouse action occurred. |
Qt::TabFocusReason | 1 | The Tab key was pressed. |
Qt::BacktabFocusReason | 2 | A Backtab occurred. The input for this may include the Shift or Control keys; e.g. Shift+Tab. |
Qt::ActiveWindowFocusReason | 3 | The window system made this window either active or inactive. |
Qt::PopupFocusReason | 4 | The application opened/closed a pop-up that grabbed/released the keyboard focus. |
Qt::ShortcutFocusReason | 5 | The user typed a label's buddy shortcut |
Qt::MenuBarFocusReason | 6 | The menu bar took focus. |
Qt::OtherFocusReason | 7 | Another reason, usually application-specific. |
See also Keyboard Focus.
This enum type describes additional flags that can be used when subscribing to a gesture.
Constant | Value | Description |
---|---|---|
Qt::DontStartGestureOnChildren | 0x01 | By default gestures can start on the widget or over any of its children. Use this flag to disable this and allow a gesture to start on the widget only. |
Qt::ReceivePartialGestures | 0x02 | Allows any ignored gesture events to be propagated to parent widgets which have specified this hint. By default only gestures that are in the Qt::GestureStarted state are propagated and the widget always gets the full gesture sequence starting with a gesture in the Qt::GestureStarted state and ending with a gesture in the Qt::GestureFinished or Qt::GestureCanceled states. |
This enum was introduced in Qt 4.6.
The GestureFlags type is a typedef for QFlags<GestureFlag>. It stores an OR combination of GestureFlag values.
See also QWidget::grabGesture() and QGraphicsObject::grabGesture().
This enum type describes the state of a gesture.
Constant | Value | Description |
---|---|---|
Qt::GestureStarted | 1 | A continuous gesture has started. |
Qt::GestureUpdated | 2 | A gesture continues. |
Qt::GestureFinished | 3 | A gesture has finished. |
Qt::GestureCanceled | 4 | A gesture was canceled. |
This enum was introduced in Qt 4.6.
See also QGesture.
This enum type describes the standard gestures.
Constant | Value | Description |
---|---|---|
Qt::TapGesture | 1 | A Tap gesture. |
Qt::TapAndHoldGesture | 2 | A Tap-And-Hold (Long-Tap) gesture. |
Qt::PanGesture | 3 | A Pan gesture. |
Qt::PinchGesture | 4 | A Pinch gesture. |
Qt::SwipeGesture | 5 | A Swipe gesture. |
Qt::CustomGesture | 0x0100 | A flag that can be used to test if the gesture is a user-defined gesture ID. |
User-defined gestures are registered with the QGestureRecognizer::registerRecognizer() function which generates a custom gesture ID with the Qt::CustomGesture flag set.
This enum was introduced in Qt 4.6.
See also QGesture, QWidget::grabGesture(), and QGraphicsObject::grabGesture().