|  | Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions |

# Qt Namespace Reference

The Qt namespace contains miscellaneous identifiers used throughout the Qt library. More...

    #include <Qt>

- Obsolete members
- Qt 3 support members

### Types

- flags Alignment
- enum AlignmentFlag { AlignLeft, AlignRight, AlignHCenter, AlignJustify, ..., AlignVertical_Mask }
- enum AnchorAttribute { AnchorName, AnchorHref }
- enum ArrowType { NoArrow, UpArrow, DownArrow, LeftArrow, RightArrow }
- enum AspectRatioMode { IgnoreAspectRatio, KeepAspectRatio, KeepAspectRatioByExpanding }
- 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 { DirectConnection, QueuedConnection, AutoConnection }
- enum ContextMenuPolicy { NoContextMenu, DefaultContextMenu, ActionsContextMenu, CustomContextMenu }
- enum Corner { TopLeftCorner, TopRightCorner, BottomLeftCorner, BottomRightCorner }
- enum CursorShape { ArrowCursor, UpArrowCursor, CrossCursor, WaitCursor, ..., BitmapCursor }
- enum DateFormat { TextDate, ISODate, LocalDate }
- enum DayOfWeek { Monday, Tuesday, Wednesday, Thursday, ..., Sunday }
- enum Dock { DockUnmanaged, DockTornOff, DockTop, DockBottom, ..., DockMinimized }
- enum DockWidgetArea { LeftDockWidgetArea, RightDockWidgetArea, TopDockWidgetArea, BottomDockWidgetArea, AllDockWidgetAreas }
- flags DockWidgetAreas
- enum DropAction { CopyAction, MoveAction, LinkAction, ActionMask, TargetMoveAction, IgnoreAction }
- flags DropActions
- enum FillRule { OddEvenFill, WindingFill }
- enum FocusPolicy { TabFocus, ClickFocus, StrongFocus, WheelFocus, NoFocus }
- enum FocusReason { MouseFocusReason, TabFocusReason, BacktabFocusReason, ActiveWindowFocusReason, ..., OtherFocusReason }
- enum GlobalColor { white, black, red, darkRed, ..., color1 }
- typedef HANDLE
- enum HitTestAccuracy { ExactHit, FuzzyHit }
- enum ImageConversionFlag { AutoColor, ColorOnly, MonoOnly, DiffuseDither, ..., AvoidDither }
- flags ImageConversionFlags
- enum InputMethodQuery { ImMicroFocus, ImFont, ImCursorPosition, ImSurroundingText, ImCurrentSelection }
- enum Key { Key_Escape, Key_Tab, Key_Backtab, Key_Backspace, ..., Key_unknown }
- enum KeyboardModifier { NoModifier, ShiftModifier, ControlModifier, AltModifier, MetaModifier, KeypadModifier }
- flags KeyboardModifiers
- enum LayoutDirection { LeftToRight, RightToLeft }
- enum Modifier { SHIFT, META, CTRL, ALT, UNICODE_ACCEL }
- enum MouseButton { NoButton, LeftButton, RightButton, MidButton, XButton1, XButton2 }
- flags MouseButtons
- enum Orientation { Horizontal, Vertical }
- flags Orientations
- enum PenCapStyle { FlatCap, SquareCap, RoundCap }
- enum PenJoinStyle { MiterJoin, BevelJoin, RoundJoin }
- enum PenStyle { NoPen, SolidLine, DashLine, DotLine, DashDotLine, DashDotDotLine }
- enum PixmapDrawingMode { ComposePixmap, CopyPixmap, CopyPixmapNoMask }
- enum ScrollBarPolicy { ScrollBarAsNeeded, ScrollBarAlwaysOff, ScrollBarAlwaysOn }
- enum ShortcutContext { WidgetShortcut, WindowShortcut, ApplicationShortcut }
- enum SortOrder { AscendingOrder, DescendingOrder }
- enum TextFlag { TextSingleLine, TextDontClip, TextExpandTabs, TextShowMnemonic, ..., TextIncludeTrailingSpaces }
- enum TextFormat { PlainText, RichText, AutoText, LogText }
- enum TimeSpec { LocalTime, UTC }
- enum ToolBarArea { LeftToolBarArea, RightToolBarArea, TopToolBarArea, BottomToolBarArea, AllToolBarAreas }
- flags ToolBarAreas
- enum ToolButtonStyle { ToolButtonIconOnly, ToolButtonTextOnly, ToolButtonTextBesideIcon, ToolButtonTextUnderIcon }
- enum TransformationMode { FastTransformation, SmoothTransformation }
- enum UIEffect { UI_General, UI_AnimateMenu, UI_FadeMenu, UI_AnimateCombo, ..., UI_AnimateToolBox }
- enum WhiteSpaceMode { WhiteSpaceNormal, WhiteSpacePre, WhiteSpaceNoWrap }
- enum WidgetAttribute { WA_DeleteOnClose, WA_QuitOnClose, WA_KeyCompression, WA_PendingMoveEvent, ..., WA_ShowModal }
- flags WindowFlags
- enum WindowState { WindowNoState, WindowMinimized, WindowMaximized, WindowFullScreen, WindowActive }
- flags WindowStates
- enum WindowType { Widget, Window, Dialog, Sheet, ..., WMacNoSheet }

### Functions

- QString convertFromPlainText ( const QString & plain, WhiteSpaceMode mode = WhiteSpacePre )
- QString escape ( const QString & plain )
- bool mightBeRichText ( const QString & text )

## Detailed Description

The Qt namespace contains miscellaneous identifiers used throughout the Qt library.

## Type Documentation

### enum Qt::AlignmentFlag
flags Qt::Alignment

This enum type is used to describe alignment. It contains horizontal and vertical flags.

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. Does not work for everything and may be interpreted as AlignAuto in some cases.

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. `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` | Synonyn for Qt::AlignLeft.
`Qt::AlignTrailing` | `AlignRight` | Synonyn 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 stores an OR combination of `AlignmentFlag` values.

### enum Qt::AnchorAttribute

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.

### enum Qt::ArrowType

Constant | Value
--- | ---
`Qt::NoArrow` | `0`
`Qt::UpArrow` | `1`
`Qt::DownArrow` | `2`
`Qt::LeftArrow` | `3`
`Qt::RightArrow` | `4`

### enum Qt::AspectRatioMode

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::scale().

### enum Qt::BGMode

Background mode:

Constant | Value
--- | ---
`Qt::TransparentMode` | `0`
`Qt::OpaqueMode` | `1`

### enum Qt::BrushStyle

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 dedicated QBrush constructor).
`Qt::ConicalGradientPattern` | `17` | Linear gradient (set using dedicated QBrush constructor).
`Qt::RadialGradientPattern` | `16` | Linear gradient (set using dedicated QBrush constructor).
`Qt::TexturePattern` | `24` | Custom pattern (see QBrush::setTexture()).

Screenshot:

See also QBrush.

### enum Qt::CaseSensitivity

Constant | Value
--- | ---
`Qt::CaseInsensitive` | `0`
`Qt::CaseSensitive` | `1`

### enum Qt::CheckState

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, QAbstractItemModel::ItemFlag, and QAbstractItemModel::Role.

### enum Qt::ClipOperation

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.

### enum Qt::ConnectionType

This enum describes the types of connection that can be used between signals and slots. In particular, it determines whether a particular signal is delivered to a slot immediately or queued for delivery at a later time.

Constant | Value | Description
--- | --- | ---
`Qt::DirectConnection` | `1` | When emitted, the signal is immediately delivered to the slot.
`Qt::QueuedConnection` | `2` | When emitted, the signal is queued until the event loop is able to deliver it to the slot.
`Qt::AutoConnection` | `0` | If the signal is emitted from an object in the same thread as the receiving object, the slot is invoked directly, as with `DirectConnection`; otherwise the signal is queued, as with `QueuedConnection`.

See also Thread Support in Qt and QObject::connect().

### enum Qt::ContextMenuPolicy

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.
`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.

### enum Qt::Corner

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.

### enum Qt::CursorShape

This enum type defines the various cursors that can be used.

Constant | Value | Description
--- | --- | ---
`Qt::ArrowCursor` | `0` | standard arrow cursor
`Qt::UpArrowCursor` | `1` | upwards arrow
`Qt::CrossCursor` | `2` | crosshair
`Qt::WaitCursor` | `3` | hourglass/watch
`Qt::IBeamCursor` | `4` | ibeam/text entry
`Qt::SizeVerCursor` | `5` | vertical resize
`Qt::SizeHorCursor` | `6` | horizontal resize
`Qt::SizeFDiagCursor` | `8` | diagonal resize ()
`Qt::SizeBDiagCursor` | `7` | diagonal resize (/)
`Qt::SizeAllCursor` | `9` | all directions resize
`Qt::BlankCursor` | `10` | blank/invisible cursor
`Qt::SplitVCursor` | `11` | vertical splitting
`Qt::SplitHCursor` | `12` | horizontal splitting
`Qt::PointingHandCursor` | `13` | a pointing hand
`Qt::ForbiddenCursor` | `14` | a slashed circle
`Qt::WhatsThisCursor` | `15` | an arrow with a question mark
`Qt::BusyCursor` | `16` | standard arrow with hourglass/watch
`Qt::BitmapCursor` | `24` | ArrowCursor is the default for widgets in a normal state.

Screenshot:

### enum Qt::DateFormat

Constant | Value | Description
--- | --- | ---
`Qt::TextDate` | `0` | The default Qt format.
`Qt::ISODate` | `1` | ISO 8601 extended format (YYYY-MM-DD, or with time, YYYY-MM-DDTHH:MM:SS).
`Qt::LocalDate` | `2` | The locale-dependent format.

### enum Qt::DayOfWeek

Constant | Value
--- | ---
`Qt::Monday` | `1`
`Qt::Tuesday` | `2`
`Qt::Wednesday` | `3`
`Qt::Thursday` | `4`
`Qt::Friday` | `5`
`Qt::Saturday` | `6`
`Qt::Sunday` | `7`

### enum Qt::Dock

Each dock window can be in one of the following positions:

Constant | Value | Description
--- | --- | ---
`Qt::DockUnmanaged` | `0` | not managed by a Q3MainWindow.
`Qt::DockTornOff` | `1` | the dock window floats as its own top level window which always stays on top of the main window.
`Qt::DockTop` | `2` | above the central widget, below the menu bar.
`Qt::DockBottom` | `3` | below the central widget, above the status bar.
`Qt::DockRight` | `4` | to the right of the central widget.
`Qt::DockLeft` | `5` | to the left of the central widget.
`Qt::DockMinimized` | `6` | the dock window is not shown (this is effectively a 'hidden' dock area); the handles of all minimized dock windows are drawn in one row below the menu bar.

### enum Qt::DockWidgetArea
flags Qt::DockWidgetAreas

Constant | Value
--- | ---
`Qt::LeftDockWidgetArea` | `0x1`
`Qt::RightDockWidgetArea` | `0x2`
`Qt::TopDockWidgetArea` | `0x4`
`Qt::BottomDockWidgetArea` | `0x8`
`Qt::AllDockWidgetAreas` | `DockWidgetArea_Mask`

The `DockWidgetAreas` type stores an OR combination of `DockWidgetArea` values.

### enum Qt::DropAction
flags Qt::DropActions

Constant | Value | Description
--- | --- | ---
`Qt::CopyAction` | `0x1` | Copy the data to the target.
`Qt::MoveAction` | `0x2` | Move the date from the source to the target.
`Qt::LinkAction` | `0x4` | Create a link from the source to the target.
`Qt::ActionMask` | `0xff` |
`Qt::TargetMoveAction` | `0x8002` |
`Qt::IgnoreAction` | `0x0` | Ignore the action (do nothing with the data).

The `DropActions` type stores an OR combination of `DropAction` values.

### enum Qt::FillRule

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.

### enum Qt::FocusPolicy

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.

### enum Qt::FocusReason

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 popup 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 the keyboard focus overview for more about the keyboard focus.

### enum Qt::GlobalColor

Qt's 19 predefined QColor objects

Constant | Value | Description
--- | --- | ---
`Qt::white` | `3` | White `(#ffffff)`
`Qt::black` | `2` | Black `(#000000)`
`Qt::red` | `7` | Red `(#ff0000)`
`Qt::darkRed` | `13` | Dark red `(#800000)`
`Qt::green` | `8` | Green `(#00ff00)`
`Qt::darkGreen` | `14` | Dark green `(#008000)`
`Qt::blue` | `9` | Blue `(#0000ff)`
`Qt::darkBlue` | `15` | Dark blue `(#000080)`
`Qt::cyan` | `10` | Cyan `(#00ffff)`
`Qt::darkCyan` | `16` | Dark cyan `(#008080)`
`Qt::magenta` | `11` | Magenta `(#ff00ff)`
`Qt::darkMagenta` | `17` | Dark magenta `(#800080)`
`Qt::yellow` | `12` | Yellow `(#ffff00)`
`Qt::darkYellow` | `18` | Dark yellow `(#808000)`
`Qt::gray` | `5` | Gray `(#a0a0a4)`
`Qt::darkGray` | `4` | Dark gray `(#808080)`
`Qt::lightGray` | `6` | Light gray `(#c0c0c0)`
`Qt::color0` | `0` | 0 pixel value (for bitmaps)
`Qt::color1` | `1` | 1 pixel value (for bitmaps)

See also QColor.

### typedef Qt::HANDLE

Platform-specific handle type for system objects. This is equivalent to `void *` on Windows, Mac OS X, and Qt/Embedded, and to `unsigned long` on X11.

Warning: Using this type is not portable.

### enum Qt::HitTestAccuracy

This enum contains the types of accuracy that can be used by the QTextDocument class when testing for mouse clicks on text documents.

Constant | Value | Description
--- | --- | ---
`Qt::ExactHit` | `0` | The point at which input occurred must coincide exactly with input-sensitive parts of the document.
`Qt::FuzzyHit` | `1` | The point at which input occurred can lie close to input-sensitive parts of the document.

### enum Qt::ImageConversionFlag
flags Qt::ImageConversionFlags

The options marked "(default)" are set if no other values from the list are included (since the defaults are zero):

Color/Mono preference (ignored for QBitmap):

Constant | Value | Description
--- | --- | ---
`Qt::AutoColor` | `0x00000000` | (default) - If the image has depth 1 and contains only black and white pixels, the pixmap becomes monochrome.
`Qt::ColorOnly` | `0x00000003` | The pixmap is dithered/converted to the native display depth.
`Qt::MonoOnly` | `0x00000002` | The pixmap becomes monochrome. If necessary, it is dithered using the chosen dithering algorithm.

Dithering mode preference for RGB channels:

Constant | Value | Description
--- | --- | ---
`Qt::DiffuseDither` | `0x00000000` | (default) - A high-quality dither.
`Qt::OrderedDither` | `0x00000010` | A faster, more ordered dither.
`Qt::ThresholdDither` | `0x00000020` | No dithering; closest color is used.

Dithering mode preference for alpha channel:

Constant | Value | Description
--- | --- | ---
`Qt::ThresholdAlphaDither` | `0x00000000` | (default) - No dithering.
`Qt::OrderedAlphaDither` | `0x00000004` | A faster, more ordered dither.
`Qt::DiffuseAlphaDither` | `0x00000008` | A high-quality dither.

Color matching versus dithering preference:

Constant | Value | Description
--- | --- | ---
`Qt::PreferDither` | `0x00000040` | (default when converting to a pixmap) - Always dither 32-bit images when the image is converted to 8 bits.
`Qt::AvoidDither` | `0x00000080` | (default when converting for the purpose of saving to file) - Dither 32-bit images only if the image has more than 256 colors and it is being converted to 8 bits.

The `ImageConversionFlags` type stores an OR combination of `ImageConversionFlag` values.

### enum Qt::InputMethodQuery

Constant | Value
--- | ---
`Qt::ImMicroFocus` | `0`
`Qt::ImFont` | `1`
`Qt::ImCursorPosition` | `2`
`Qt::ImSurroundingText` | `3`
`Qt::ImCurrentSelection` | `4`

### enum Qt::Key

The key names used by Qt.

Constant | Value | Description
--- | --- | ---
`Qt::Key_Escape` | `0x01000000` |
`Qt::Key_Tab` | `0x01000001` |
`Qt::Key_Backtab` | `0x01000002` |
`Qt::Key_Backspace` | `0x01000003` |
`Qt::Key_Return` | `0x01000004` |
`Qt::Key_Enter` | `0x01000005` |
`Qt::Key_Insert` | `0x01000006` |
`Qt::Key_Delete` | `0x01000007` |
`Qt::Key_Pause` | `0x01000008` |
`Qt::Key_Print` | `0x01000009` |
`Qt::Key_SysReq` | `0x0100000a` |
`Qt::Key_Clear` | `0x0100000b` |
`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` |
`Qt::Key_Meta` | `0x01000022` |
`Qt::Key_Alt` | `0x01000023` |
`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_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_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` |
`Qt::Key_Launch1` | `0x010000a3` |
`Qt::Key_Launch2` | `0x010000a4` |
`Qt::Key_Launch3` | `0x010000a5` |
`Qt::Key_Launch4` | `0x010000a6` |
`Qt::Key_Launch5` | `0x010000a7` |
`Qt::Key_Launch6` | `0x010000a8` |
`Qt::Key_Launch7` | `0x010000a9` |
`Qt::Key_Launch8` | `0x010000aa` |
`Qt::Key_Launch9` | `0x010000ab` |
`Qt::Key_LaunchA` | `0x010000ac` |
`Qt::Key_LaunchB` | `0x010000ad` |
`Qt::Key_LaunchC` | `0x010000ae` |
`Qt::Key_LaunchD` | `0x010000af` |
`Qt::Key_LaunchE` | `0x010000b0` |
`Qt::Key_LaunchF` | `0x010000b1` |
`Qt::Key_MediaLast` | `0x0100ffff` |
`Qt::Key_unknown` | `0x01ffffff` |

See also QKeyEvent::key().

### enum Qt::KeyboardModifier
flags Qt::KeyboardModifiers

This enum describes the modifier keys.

Constant | Value | Description
--- | --- | ---
`Qt::NoModifier` | `0x00000000` | No modifier key is pressed.
`Qt::ShiftModifier` | `0x02000000` | A Shift key on the keyboard is pressed.
`Qt::ControlModifier` | `0x04000000` | A Ctrl key on the keyboard is pressed.
`Qt::AltModifier` | `0x08000000` | An Alt key on the keyboard is pressed.
`Qt::MetaModifier` | `0x10000000` | A Meta key on the keyboard is pressed.
`Qt::KeypadModifier` | `0x20000000` | A keypad button is pressed.

The `KeyboardModifiers` type stores an OR combination of `KeyboardModifier` values.

See also MouseButton and Modifier.

### enum Qt::LayoutDirection

Specifies the direction of Qt's layouts:

Constant | Value | Description
--- | --- | ---
`Qt::LeftToRight` | `0` | Left-to-right layout.
`Qt::RightToLeft` | `1` | Right-to-left layout.

Right-to-left layouts are necessary for certain languages, notably Arabic and Hebrew.

See also QApplication::setLayoutDirection() and QWidget::setLayoutDirection().

### enum Qt::Modifier

This enum provides shorter names for the keyboard modifier keys supported by Qt.

Constant | Value | Description
--- | --- | ---
`Qt::SHIFT` | `Qt::ShiftModifier` | The Shift keys provided on all standard keyboards.
`Qt::META` | `Qt::MetaModifier` | The Meta keys.
`Qt::CTRL` | `Qt::ControlModifier` | The Ctrl keys.
`Qt::ALT` | `Qt::AltModifier` | The normal Alt keys, but not keys like AltGr.
`Qt::UNICODE_ACCEL` | `0x00000000` | The shortcut is specified as a Unicode code point, not as a Qt Key.

See also KeyboardModifier and MouseButton.

### enum Qt::MouseButton
flags Qt::MouseButtons

This enum type describes the different mouse buttons.

Constant | Value | Description
--- | --- | ---
`Qt::NoButton` | `0x00000000` | The button state does not refer to any button (see QMouseEvent::button()).
`Qt::LeftButton` | `0x00000001` | The left button is pressed, or an event refers to the left button. (The left button may be the right button on left-handed mice.)
`Qt::RightButton` | `0x00000002` | The right button.
`Qt::MidButton` | `0x00000004` | The middle button.
`Qt::XButton1` | `0x00000008` | The first X button.
`Qt::XButton2` | `0x00000010` | The second X button.

The `MouseButtons` type stores an OR combination of `MouseButton` values.

See also KeyboardModifier and Modifier.

### enum Qt::Orientation
flags Qt::Orientations

This type is used to signify an object's orientation.

Constant | Value
--- | ---
`Qt::Horizontal` | `0x1`
`Qt::Vertical` | `0x2`

Orientation is used with QScrollBar for example.

The `Orientations` type stores an OR combination of `Orientation` values.

### enum Qt::PenCapStyle

This enum type defines the pen cap styles supported by Qt, i.e. the line end caps that can be drawn using QPainter.

Constant | Value | Description
--- | --- | ---
`Qt::FlatCap` | `0x00` | a square line end that does not cover the end point of the line.
`Qt::SquareCap` | `0x10` | a square line end that covers the end point and extends beyond it by half the line width.
`Qt::RoundCap` | `0x20` | a rounded line end.

Screenshot:

See also QPen.

### enum Qt::PenJoinStyle

This enum type defines the pen join styles supported by Qt, i.e. which joins between two connected lines can be drawn using QPainter.

Constant | Value | Description
--- | --- | ---
`Qt::MiterJoin` | `0x00` | The outer edges of the lines are extended to meet at an angle, and this area is filled.
`Qt::BevelJoin` | `0x40` | The triangular notch between the two lines is filled.
`Qt::RoundJoin` | `0x80` | A circular arc between the two lines is filled.

Screenshot:

See also QPen.

### enum Qt::PenStyle

This enum type defines the pen styles that can be drawn using QPainter. The styles are

Constant | Value | Description
--- | --- | ---
`Qt::NoPen` | `0` | no line at all. For example, QPainter::drawRect() fills but does not draw any boundary line.
`Qt::SolidLine` | `1` | a plain line.
`Qt::DashLine` | `2` | dashes separated by a few pixels.
`Qt::DotLine` | `3` | dots separated by a few pixels.
`Qt::DashDotLine` | `4` | alternate dots and dashes.
`Qt::DashDotDotLine` | `5` | one dash, two dots, one dash, two dots.

Screenshot:

See also QPen.

### enum Qt::PixmapDrawingMode

Constant | Value | Description
--- | --- | ---
`Qt::ComposePixmap` | `0` | This mode will merge the source with the destination, including the alpha channels.
`Qt::CopyPixmap` | `1` | Copies the source to the destination, including the mask. If the destination is not a pixmap, this operation is undefined.
`Qt::CopyPixmapNoMask` | `2` | Draws the source onto the destination, ignoring the source mask.

### enum Qt::ScrollBarPolicy

This enum type describes the various modes of QAbstractScrollArea's scroll bars.

Constant | Value | Description
--- | --- | ---
`Qt::ScrollBarAsNeeded` | `0` | QAbstractScrollArea shows a scroll bar when the content is too large to fit and not otherwise. This is the default.
`Qt::ScrollBarAlwaysOff` | `1` | QAbstractScrollArea never shows a scroll bar.
`Qt::ScrollBarAlwaysOn` | `2` | QAbstractScrollArea always shows a scroll bar.

(The modes for the horizontal and vertical scroll bars are independent.)

### enum Qt::ShortcutContext

For a QEvent::Shortcut event to occur, the shortcut's key sequence must be entered by the user in a context where the shortcut is active. The possible contexts are these:

Constant | Value | Description
--- | --- | ---
`Qt::WidgetShortcut` | `0` | The shortcut is only triggered when its parent widget has focus.
`Qt::WindowShortcut` | `1` | The shortcut is triggered when its parent widget is a logical subwidget of the active top-level window.
`Qt::ApplicationShortcut` | `2` | The shortcut is triggered when the application is active.

### enum Qt::SortOrder

This enum describes how the items in a widget are sorted.

Constant | Value | Description
--- | --- | ---
`Qt::AscendingOrder` | `0` | The items are sorted ascending e.g. starts with 'AAA' ends with 'ZZZ' in Latin-1 locales
`Qt::DescendingOrder` | `1` | The items are sorted descending e.g. starts with 'ZZZ' ends with 'AAA' in Latin-1 locales

### enum Qt::TextFlag

This enum type is used to define some modifier flags. Some of these flags only make sense in the context of printing:

Constant | Value | Description
--- | --- | ---
`Qt::TextSingleLine` | `0x0100` | Treats all whitespace as spaces and prints just one line.
`Qt::TextDontClip` | `0x0200` | If it's impossible to stay within the given bounds, it prints outside.
`Qt::TextExpandTabs` | `0x0400` | Makes the U+0009 (ASCII tab) character move to the next tab stop.
`Qt::TextShowMnemonic` | `0x0800` | Displays the string "&P" as P (see QButton for an example). For an ampersand, use "&&".
`Qt::TextWordWrap` | `0x1000` | Breaks lines at appropriate points, e.g. at word boundaries.
`Qt::TextWrapAnywhere` | `0x2000` | Breaks lines anywhere, even within words.
`Qt::TextHideMnemonic` | `0x8000` | Same as `TextShowMnemonic` but doesn't draw the underlines.
`Qt::TextDontPrint` | `0x4000` | Treat this text as "hidden" and don't print it.
`Qt::TextIncludeTrailingSpaces` | `0x08000000` | Don't automatically delete trailing whitespace.

You can use as many modifier flags as you want, except that `TextSingleLine` and `TextWordBreak` cannot be combined.

Flags that are inappropriate for a given use are generally ignored.

### enum Qt::TextFormat

This enum is used in widgets that can display both plain text and rich text, e.g. QLabel. It is used for deciding whether a text string should be interpreted as one or the other. This is normally done by passing one of the enum values to a setTextFormat() function.

Constant | Value | Description
--- | --- | ---
`Qt::PlainText` | `0` | The text string is interpreted as a plain text string.
`Qt::RichText` | `1` | The text string is interpreted as a rich text string using the current Q3StyleSheet::defaultSheet().
`Qt::AutoText` | `2` | The text string is interpreted as for `RichText` if Q3StyleSheet::mightBeRichText() returns true, otherwise as `PlainText`.
`Qt::LogText` | `3` | A special, limited text format which is only used by QTextEdit in an optimized mode.

### enum Qt::TimeSpec

Constant | Value | Description
--- | --- | ---
`Qt::LocalTime` | `0` | Locale dependent time (Timezones and Daylight Savings Time).
`Qt::UTC` | `1` | Coordinated Universal Time, replaces Greenwich Mean Time.

### enum Qt::ToolBarArea
flags Qt::ToolBarAreas

Constant | Value
--- | ---
`Qt::LeftToolBarArea` | `0x1`
`Qt::RightToolBarArea` | `0x2`
`Qt::TopToolBarArea` | `0x4`
`Qt::BottomToolBarArea` | `0x8`
`Qt::AllToolBarAreas` | `ToolBarArea_Mask`

The `ToolBarAreas` type stores an OR combination of `ToolBarArea` values.

### enum Qt::ToolButtonStyle

The style of the tool button, describing how the button's text and icon should be displayed.

Constant | Value | Description
--- | --- | ---
`Qt::ToolButtonIconOnly` | `0` | Only display the icon.
`Qt::ToolButtonTextOnly` | `1` | Only display the text.
`Qt::ToolButtonTextBesideIcon` | `2` | The text appears beside the icon.
`Qt::ToolButtonTextUnderIcon` | `3` | The text appears under the icon.

### enum Qt::TransformationMode

This enum type defines whether image transformations (e.g., scaling) should be smooth or not.

Constant | Value | Description
--- | --- | ---
`Qt::FastTransformation` | `0` | The transformation is performed quickly, with no smoothing.
`Qt::SmoothTransformation` | `1` | The resulting image has smoothed edges.

See also QImage::scale().

### enum Qt::UIEffect

Constant | Value | Description
--- | --- | ---
`Qt::UI_General` | `0` |
`Qt::UI_AnimateMenu` | `1` |
`Qt::UI_FadeMenu` | `2` |
`Qt::UI_AnimateCombo` | `3` |
`Qt::UI_AnimateTooltip` | `4` |
`Qt::UI_FadeTooltip` | `5` |
`Qt::UI_AnimateToolBox` | `6` | Reserved

See also QApplication::setEffectEnabled().

### enum Qt::WhiteSpaceMode

This enum describes the types of whitespace mode that are used by the QTextDocument class to meet the requirements of different kinds of textual information.

Constant | Value | Description
--- | --- | ---
`Qt::WhiteSpaceNormal` | `0` | The whitespace mode used to display normal word wrapped text in paragraphs.
`Qt::WhiteSpacePre` | `1` | A preformatted text mode in which whitespace is reproduced exactly.
`Qt::WhiteSpaceNoWrap` | `2` |

### enum Qt::WidgetAttribute

This enum type is used to specify various widget attributes. Attributes are set and cleared with QWidget::setAttribute(), and queried with QWidget::testAttribute(), although some have special convenience functions which are mentioned below.

Constant | Value | Description
--- | --- | ---
`Qt::WA_DeleteOnClose` | `55` | makes Qt delete this widget when the widget has accepted the close event (see QWidget::closeEvent()).
`Qt::WA_QuitOnClose` | `76` | makes Qt quit the application when the last widget with the attribute set has accepted closeEvent(). This behaviour can be adjusted with the QApplication::quitOnLastWindowClosed property. By default the attribute is set for all widgets of type Qt::Window.

`Qt::WA_KeyCompression`

`33`

Enables key event compression if set, and disables it if not set. By default key compression is off, so widgets receive one key press event for each key press (or more, since autorepeat is usually on). If you turn it on and your program doesn't keep up with key input, Qt may try to compress key events so that more than one character can be processed in each event. For example, a word processor widget might receive 2, 3 or more characters in each 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. Not all platforms support this compression, in which case turning it on will have no effect. This is set/cleared by the widget's author.

`Qt::WA_PendingMoveEvent` | `34` | Indicates that a move event is pending, e.g. when a hidden widget was moved. This is set/cleared by the Qt kernel
`Qt::WA_PendingResizeEvent` | `35` | Indicates that a resize event is pending, e.g. when a hidden widget was resized. This is set/cleared by the Qt kernel.
`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 is set/cleared by the Qt kernel.
`Qt::WA_Disabled` | `0` | Indicates that the widget is disabled, i.e. it does not receive any mouse or keyboard events. There is also a getter functions QWidget::isEnabled(). This is set/cleared by the Qt kernel.
`Qt::WA_ContentsPropagated` | `3` | Allows the contents painted in a QWidget::paintEvent() to be used as the background for children that inherit their background. This is set/cleared by the widget author or by the style.
`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() and QWidget::setDisabled().
`Qt::WA_SetPalette` | `36` | Indicates that the widgets has a palette of its own. This is set/cleared by QWidget::setPalette().
`Qt::WA_SetFont` | `37` | Indicates that the widgets has a font of its own. This is set/cleared by QWidget::setFont().
`Qt::WA_SetCursor` | `38` | Indicates that the widgets has a cursor of its own. This is set/cleared by QWidget::setCursor() and QWidget::unsetCursor().
`Qt::WA_SetForegroundRole` | `39` | Indicates that the widgets has an explicit foreground role. This is set/cleared by QWidget::setForegroundRole().
`Qt::WA_SetBackgroundRole` | `40` | Indicates that the widgets has an explicit background role. This is set/cleared by QWidget::setBackgroundRole().

`Qt::WA_NoBackground`

`4`

Indicates that the widget paints all its pixels when it receives a paint event. It is thus not required for operations like updating, resizing, scrolling and focus changes to call erase the widget before generating paint events. Using WA_NoBackground is a small optimization. It can help to reduce flicker on systems that do not provide double buffer support, and it avoids the computational cycles necessary to erase the background prior to paint. NOTE: Unlike WA_NoSystemBackground, WA_NoBackground makes an effort to avoid transparent window backgrounds. This is set/cleared by the widget's author.

`Qt::WA_NoSystemBackground`

`9`

Indicates that the widget has no background, i.e. when the widget receives paint events, the background is not automatically repainted. NOTE: Unlike WA_NoBackground, newly exposed areas are never filled with the background (e.g after showing a window for the first time the user can see "through" it until the application processes the paint events). Setting this flag implicitly disables double buffering for the widget. This is set/cleared by the widget's author.

`Qt::WA_UpdatesDisabled` | `10` | Indicates that updates are blocked (including the system background). This flag must never be set/cleared by the widget author. It is set/cleared by the Qt kernel.
`Qt::WA_ForceUpdatesDisabled` | `59` | Indicates that the widget is explicitly updates disabled, 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_StaticContents` | `5` | Indicates that the widget contents are north-west aligned and static. On resize, such a widget will receive paint events only for the newly visible part of itself. This is set/cleared by the widget's author.
`Qt::WA_PaintOnScreen` | `8` | Indicates that the widget wants to draw directly onto the screen (implies no double buffering). This is not supported on all platforms. This is set/cleared by the widget's author.
`Qt::WA_PaintUnclipped` | `52` | Makes all painters operating on this widget unclipped. Children of this widget or other widgets in front of it do not clip the area the painter can paint on.
`Qt::WA_PaintOutsidePaintEvent` | `13` | Makes it possible to use QPainter to paint on the widget outside paintEvent(). This is currently not supported on Mac OS X. We recommend that you use this attribute only when porting Qt 3 code to Qt 4.
`Qt::WA_WindowModified` | `41` | Indicates that the window is marked as modified. On some platforms this will mean nothing, on others (including Mac OS X and Windows) the window will take a modified appearance. This is set/cleared by QWidget::setWindowModified().
`Qt::WA_Resized` | `42` | Indicates that the widget has an explicit size. This is set/cleared by QWidget::resize() and by QWidget::setGeometry().
`Qt::WA_Moved` | `43` | Indicates that the widget has an explicit position. This is set/cleared by QWidget::move() and by QWidget::setGeometry().
`Qt::WA_Mapped` | `11` | Indicates that the widget is mapped on screen. This is set/cleared by the Qt kernel.
`Qt::WA_NoMouseReplay` | `54` | Used for popup widgets. Indicates that the most recent mouse press event should not be replayed when the popup 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_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_MacMetalStyle` | `46` | Indicates the the widget should be drawn in metal style as supported by the windowing system (only meaningfull on Mac OS X). This is set by widget's author.
`Qt::WA_CustomWhatsThis` | `47` | Indicates that the widget wants to continue operating normally in What's This mode This is set by the widget's author.
`Qt::WA_LayoutOnEntireRect` | `48` | Indicates that the widget wants QLayout to operate on the entire QWidget::rect(), not only on QWidget::contentsRect(). This is set by the widget's author.
`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_MouseTracking` | `2` | Indicates that the widget has mouse tracking enabled. See QWidget::mouseTracking.

`Qt::WA_GroupLeader`

`72`

Makes this window a group leader. A group leader should not have a parent (i.e. it should be a top-level window). Any decendant windows (direct or indirect) of a group leader are in its group; other windows are not. If you show a secondary window from the group (i.e. show a window whose top-most parent is a group leader), that window will be modal with respect to the other windows in the group, but modeless with respect to windows in other groups.

`Qt::WA_KeyboardFocusChange` | `77` | Set on a toplevel window when the users changes focus with the keyboard (tab, backtab, or shortcut).
`Qt::WA_InputMethodEnabled` | `14` |
`Qt::WA_MacNoClickThrough` | `12` |
`Qt::WA_MouseNoMask` | `71` |
`Qt::WA_NoMousePropagation` | `73` |
`Qt::WA_RightToLeft` | `56` |
`Qt::WA_SetLayoutDirection` | `57` |
`Qt::WA_ShowModal` | `70` |

### enum Qt::WindowState
flags Qt::WindowStates

This enum type is used to specify the current state of a top-level window.

The states are

Constant | Value | Description
--- | --- | ---
`Qt::WindowNoState` | `0x00000000` | The window has no state set (in normal state).
`Qt::WindowMinimized` | `0x00000001` | The window is minimized (i.e. iconified).
`Qt::WindowMaximized` | `0x00000002` | The window is maximized with a frame around it.
`Qt::WindowFullScreen` | `0x00000004` | The window fills the entire screen without any frame around it.
`Qt::WindowActive` | `0x00000008` | The window is the active window, i.e. it has keyboard focus.

The `WindowStates` type stores an OR combination of `WindowState` values.

### enum Qt::WindowType
flags Qt::WindowFlags

This enum type is used to specify various window-system properties for the widget. They are fairly unusual but necessary in a few cases. Some of these flags depend on whether the underlying window manager supports them.

The main types are

Constant | Value
--- | ---
`Qt::Widget` | `0x00000000`

Constant | Value | Description
--- | --- | ---
`Qt::Window` | `0x00000001` | indicates that this widget is a window, usually with a window system frame and a title bar.

`Qt::Dialog`

`0x00000002 | Window`

indicates that this widget is a top-level window that should be decorated as a dialog (i.e. typically no maximize or minimize buttons in the title bar). If you want to use it as a modal dialog it should be launched from another window, or have a parent and this flag should be combined with `WShowModal`. If you make it modal, the dialog will prevent other top-level windows in the application from getting any input. `Dialog` implies `Window`. We refer to a top-level window that has a parent as a secondary window. (See also `Qt::WA_GroupLeader`.)

`Qt::Sheet` | `0x00000004 | Window` | indicates that this widget is a Macintosh sheet.
`Qt::Drawer` | `0x00000006 | Window` | indicates that this widget is a Macintosh drawer.
`Qt::Popup` | `0x00000008 | Window` | indicates that this widget is a popup top-level window, i.e. that it is modal, but has a window system frame appropriate for popup menus. `Popup` implies `Window`.

`Qt::Tool`

`0x0000000a | Window`

Makes the window 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. It 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.

`Qt::ToolTip` | `0x0000000c | Window` |

Constant | Value | Description
--- | --- | ---
`Qt::SplashScreen` | `0x0000000e | Window` | Indicates that the window is a splash screen.
`Qt::Desktop` | `0x00000010 | Window` | indicates that this widget is the desktop. See also `WPaintDesktop` below. `Desktop` implies `Window`.
`Qt::SubWindow` | `0x00000012` |

There are also a number of flags which you can use to customize the appearance of top-level windows. These have no effect on other windows:

Constant | Value | Description
--- | --- | ---
`Qt::MSWindowsFixedSizeDialogHint` | `0x00000100` | Gives the window a thin dialog border on Windows. This style is traditionally used for fixed-size dialogs.
`Qt::X11BypassWindowManagerHint` | `0x00000400` | Bypass the window manager completely. This results in a borderless window that is not managed at all (i.e. no keyboard input unless you call QWidget::activateWindow() manually).
`Qt::FramelessWindowHint` | `0x00000800` | Produces a borderless window. The user cannot move or resize a borderless window via the window system. On X11, the result of the flag is dependent on the window manager and its ability to understand Motif and/or NETWM hints. Most existing modern window managers can handle this.
`Qt::WindowTitleHint` | `0x00001000` | Gives the window a title bar.
`Qt::WindowSystemMenuHint` | `0x00002000` | Adds a window system menu, and possibly a close button.
`Qt::WindowMinimizeButtonHint` | `0x00004000` | Adds a minimize button. On some platforms this implies `Qt::WindowSystemMenuHint` for it to work.
`Qt::WindowMaximizeButtonHint` | `0x00008000` | Adds a maximize button. On some platforms this implies `Qt::WindowSystemMenuHint` for it to work.
`Qt::WindowMinMaxButtonsHint` | `WindowMinimizeButtonHint | WindowMaximizeButtonHint` | Adds a minimize and a maximize button. On some platforms this implies `Qt::WindowSystemMenuHint` for it to work.
`Qt::WindowContextHelpButtonHint` | `0x00010000` | Adds a context help button to dialogs. On some platforms this implies `Qt::WindowSystemMenuHint` for it to work.
`Qt::WindowShadeButtonHint` | `0x00020000` |

Constant | Value | Description
--- | --- | ---
`Qt::WindowStaysOnTopHint` | `0x00040000` | Informs the window system that the window should stay on top of all other windows. Note that on some window managers on X11 you also have to pass `WX11BypassWindowManagerHint` for this flag to work correctly.
`Qt::WindowType_Mask` | `0x000000ff` |

Obsolete flags:

Constant | Value | Description
--- | --- | ---
`Qt::WMouseNoMask` | `0x00080000` | Use Qt::WA_MouseNoMask instead.
`Qt::WDestructiveClose` | `0x00100000` | Use Qt::WA_DeleteOnClose instead.
`Qt::WStaticContents` | `0x00200000` | Use Qt::WA_StaticContents instead.
`Qt::WGroupLeader` | `0x00400000` | Use Qt::WA_GroupLeader instead.
`Qt::WShowModal` | `0x00800000` | Use Qt::WA_ShowModal instead.
`Qt::WNoMousePropagation` | `0x01000000` | Use Qt::WA_NoMousePropagation instead.
`Qt::WType_TopLevel` | `Window` | Use Qt::Window instead.
`Qt::WType_Dialog` | `Dialog` | Use Qt::Dialog instead.
`Qt::WType_Popup` | `Popup` | Use Qt::Popup instead.
`Qt::WType_Desktop` | `Desktop` | Use Qt::Desktop instead.
`Qt::WType_Mask` | `WindowType_Mask` | Use Qt::WindowType_Mask instead.
`Qt::WStyle_Customize` | `0` | No longer needed.
`Qt::WStyle_NormalBorder` | `0` | No longer needed.
`Qt::WStyle_DialogBorder` | `MSWindowsFixedSizeDialogHint` | Use Qt::MSWindowsFixedSizeDialogHint instead.
`Qt::WStyle_NoBorder` | `FramelessWindowHint` | Use Qt::FramelessWindowHint instead.
`Qt::WStyle_Title` | `WindowTitleHint` | Use Qt::WindowTitleHint instead.
`Qt::WStyle_SysMenu` | `WindowSystemMenuHint` | Use Qt::WindowSystemMenuHint instead.
`Qt::WStyle_Minimize` | `WindowMinimizeButtonHint` | Use Qt::WindowMinimizeButtonHint instead.
`Qt::WStyle_Maximize` | `WindowMaximizeButtonHint` | Use Qt::WindowMaximizeButtonHint instead.
`Qt::WStyle_MinMax` | `WStyle_Minimize | WStyle_Maximize` | Use Qt::WindowMinMaxButtonsHint instead.
`Qt::WStyle_Tool` | `Tool` | Use Qt::Tool instead.
`Qt::WStyle_StaysOnTop` | `WindowStaysOnTopHint` | Use Qt::WindowStaysOnTopHint instead.
`Qt::WStyle_ContextHelp` | `WindowContextHelpButtonHint` | Use Qt::WindowContextHelpButtonHint instead.
`Qt::WPaintDesktop` | `0` | No longer needed.
`Qt::WPaintClever` | `0` | No longer needed.
`Qt::WX11BypassWM` | `X11BypassWindowManagerHint` | Use Qt::X11BypassWindowManagerHint instead.
`Qt::WWinOwnDC` | `MSWindowsOwnDC` | No longer needed.
`Qt::WMacSheet` | `Sheet` | Use Qt::Sheet instead.
`Qt::WMacDrawer` | `Drawer` | Use Qt::Drawer instead.
`Qt::WStyle_Splash` | `SplashScreen` | Use Qt::SplashScreen instead.
`Qt::WNoAutoErase` | `0` | No longer needed.
`Qt::WRepaintNoErase` | `0` | No longer needed.
`Qt::WNorthWestGravity` | `WStaticContents` | Use Qt::WA_StaticContents instead.
`Qt::WType_Modal` | `Dialog | WShowModal` | Use Qt::Dialog and Qt::WA_ShowModal instead.
`Qt::WStyle_Dialog` | `Dialog` | Use Qt::Dialog instead.
`Qt::WStyle_NoBorderEx` | `FramelessWindowHint` | Use Qt::FramelessWindowHint instead.
`Qt::WResizeNoErase` | `0` | No longer needed.
`Qt::WMacNoSheet` | `0` | No longer needed.

The `WindowFlags` type stores an OR combination of `WindowType` values.

## Function Documentation

### QString Qt::convertFromPlainText ( const QString & plain, WhiteSpaceMode mode = WhiteSpacePre )

Auxiliary function. Converts the plain text string plain to a rich text formatted paragraph while preserving most of its look.

mode defines the whitespace mode. Possible values are `QStyleSheetItem::WhiteSpacePre` (no wrapping, all whitespaces preserved) and `QStyleSheetItem::WhiteSpaceNormal` (wrapping, simplified whitespaces).

See also escape().

### QString Qt::escape ( const QString & plain )

Auxiliary function. Converts the plain text string plain to a rich text formatted string with any HTML meta-characters escaped.

### bool Qt::mightBeRichText ( const QString & text )

Returns true if the string text is likely to be rich text; otherwise returns false.

This function uses a fast and therefore simple heuristic. It mainly checks whether there is something that looks like a tag before the first line break. Although the result may be correct for common cases, there is no guarantee.