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>

- Compatibility members

### Types

- typedef Alignment
- enum AlignmentFlag { AlignAuto, AlignLeft, AlignRight, AlignHCenter, AlignJustify, ..., AlignVertical_Mask }
- enum AnchorAttribute { AnchorName, AnchorHref }
- enum ArrowType { UpArrow, DownArrow, LeftArrow, RightArrow }
- enum AspectRatioMode { IgnoreAspectRatio, KeepAspectRatio, KeepAspectRatioByExpanding }
- enum BGMode { TransparentMode, OpaqueMode }
- enum BrushStyle { NoBrush, SolidPattern, Dense1Pattern, Dense2Pattern, Dense3Pattern, ..., CustomPattern }
- enum ButtonState { NoButton, LeftButton, RightButton, MidButton, ShiftButton, ..., Keypad }
- enum CaseSensitivity { CaseInsensitive, CaseSensitive }
- enum Corner { TopLeftCorner, TopRightCorner, BottomLeftCorner, BottomRightCorner }
- enum CursorShape { ArrowCursor, UpArrowCursor, CrossCursor, WaitCursor, BusyCursor, ..., BitmapCursor }
- enum DateFormat { TextDate, ISODate, LocalDate }
- enum DayOfWeek { Monday, Tuesday, Wednesday, Thursday, Friday, ..., Sunday }
- enum Dock { DockTop, DockBottom, DockLeft, DockRight, DockMinimized, ..., DockUnmanaged }
- enum DockWindowArea { DockWindowAreaLeft, DockWindowAreaRight, DockWindowAreaTop, DockWindowAreaBottom, AllDockWindowAreas }
- typedef DockWindowAreas
- enum FocusPolicy { TabFocus, ClickFocus, StrongFocus, WheelFocus, NoFocus }
- enum GlobalColor { white, black, red, darkRed, green, ..., color1 }
- typedef HANDLE
- enum ImageConversionFlag { AutoColor, ColorOnly, MonoOnly, DiffuseDither, OrderedDither, ..., AvoidDither }
- typedef ImageConversionFlags
- enum Key { Key_Escape, Key_Tab, Key_Backtab, Key_Backspace, Key_Return, ..., Key_unknown }
- enum MacintoshVersion { MV_Unknown, MV_9, MV_10_DOT_3, MV_10_DOT_2, MV_10_DOT_1, ..., MV_PANTHER }
- enum Modifier { SHIFT, META, CTRL, ALT, UNICODE_ACCEL }
- enum Orientation { Horizontal, Vertical }
- enum PenCapStyle { FlatCap, SquareCap, RoundCap }
- enum PenJoinStyle { MiterJoin, BevelJoin, RoundJoin }
- enum PenStyle { NoPen, SolidLine, DashLine, DotLine, DashDotLine, DashDotDotLine }
- enum PixmapDrawingMode { ComposePixmap, CopyPixmap, CopyPixmapNoMask }
- enum RectangleEdge { LeftEdge, TopEdge, RightEdge, BottomEdge }
- typedef RectangleEdges
- enum ScrollBarPolicy { ScrollBarAsNeeded, ScrollBarAlwaysOff, ScrollBarAlwaysOn }
- enum SettingsFormat { NativeFormat, IniFormat }
- enum SettingsScope { UserScope, SystemScope }
- enum ShortcutContext { ShortcutOnFocusWidget, ShortcutOnActiveWindow, ShortcutOnApplication }
- enum SocketError { ConnectionRefusedError, RemoteHostClosedError, HostNotFoundError, SocketAccessError, SocketResourceError, ..., UnknownSocketError }
- enum SocketState { UnconnectedState, HostLookupState, ConnectingState, ConnectedState, BoundState, ..., ListeningState }
- enum SocketType { TcpSocket, UdpSocket, UnknownSocketType }
- enum SortOrder { AscendingOrder, DescendingOrder }
- enum TextFlags { TextSingleLine, TextDontClip, TextExpandTabs, TextShowMnemonic, TextWordWrap, ..., TextStrikeOut }
- enum TextFormat { PlainText, RichText, AutoText, LogText }
- enum TimeSpec { LocalTime, UTC }
- enum ToolBarArea { ToolBarAreaLeft, ToolBarAreaRight, ToolBarAreaTop, ToolBarAreaBottom, AllToolBarAreas }
- typedef ToolBarAreas
- enum TransformationMode { FastTransformation, SmoothTransformation }
- enum UIEffect { UI_General, UI_AnimateMenu, UI_FadeMenu, UI_AnimateCombo, UI_AnimateTooltip, ..., UI_AnimateToolBox }
- enum WFlag { WType_TopLevel, WType_Dialog, WType_Popup, WType_Desktop, WStyle_Customize, ..., WShowModal }
- typedef WFlags
- typedef WState
- enum WidgetAttribute { WA_DeleteOnClose, WA_KeyCompression, WA_PendingMoveEvent, WA_PendingResizeEvent, WA_UnderMouse, ..., WA_LayoutOnEntireRect }
- enum WindowState { WindowNoState, WindowMinimized, WindowMaximized, WindowFullScreen, WindowActive }
- enum WindowsVersion { WV_32s, WV_95, WV_98, WV_Me, WV_DOS_based, ..., WV_CE_based }

## Detailed Description

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

## Type Documentation

### enum Qt::AlignmentFlag
typedef Qt::Alignment

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

The horizontal flags are:

`Qt::AlignAuto` | Aligns according to the language. Left for most, right for Arabic and Hebrew.
`Qt::AlignLeft` | Aligns with the left edge.
`Qt::AlignRight` | Aligns with the right edge.
`Qt::AlignHCenter` | Centers horizontally in the available space.
`Qt::AlignJustify` | 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:

`Qt::AlignTop` | Aligns with the top.
`Qt::AlignBottom` | Aligns with the bottom.
`Qt::AlignVCenter` | Centers vertically in the available space.

You can use only one of the horizontal flags at a time. There is one two-dimensional flag:

`Qt::AlignCenter` | 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.

Masks:

`Qt::AlignHorizontal_Mask` |
`Qt::AlignVertical_Mask` |

Conflicting combinations of flags have undefined meanings.

The Alignment typedef can store a combination of AlignmentFlag values.

### enum Qt::AnchorAttribute

An anchor has one or more of the following attributes:

`Qt::AnchorName` | the name attribute of the anchor. This attribute is used when scrolling to an anchor in the document.
`Qt::AnchorHref` | the href attribute of the anchor. This attribute is used when a link is clicked to determine what content to load.

### enum Qt::ArrowType

`Qt::UpArrow` |
`Qt::DownArrow` |
`Qt::LeftArrow` |
`Qt::RightArrow` |

### enum Qt::AspectRatioMode

This enum type defines what happens to the aspect ratio when scaling an rectangle.

`Qt::IgnoreAspectRatio` | The size is scaled freely. The aspect ratio is not preserved.
`Qt::KeepAspectRatio` | The size is scaled to a rectangle as large as possible inside a given rectangle, preserving the aspect ratio.
`Qt::KeepAspectRatioByExpanding` | 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

`Qt::TransparentMode` |
`Qt::OpaqueMode` |

### enum Qt::BrushStyle

`Qt::NoBrush` |
`Qt::SolidPattern` |
`Qt::Dense1Pattern` |
`Qt::Dense2Pattern` |
`Qt::Dense3Pattern` |
`Qt::Dense4Pattern` |
`Qt::Dense5Pattern` |
`Qt::Dense6Pattern` |
`Qt::Dense7Pattern` |
`Qt::HorPattern` |
`Qt::VerPattern` |
`Qt::CrossPattern` |
`Qt::BDiagPattern` |
`Qt::FDiagPattern` |
`Qt::DiagCrossPattern` |
`Qt::LinearGradientPattern` |
`Qt::CustomPattern` |

See also QBrush.

### enum Qt::ButtonState

This enum type describes the state of the mouse and the modifier buttons.

`Qt::NoButton` | The button state does not refer to any button (see QMouseEvent::button()).
`Qt::LeftButton` | 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` | The right button.
`Qt::MidButton` | The middle button.
`Qt::ShiftButton` | A Shift key on the keyboard is pressed.
`Qt::ControlButton` | A Ctrl key on the keyboard is pressed.
`Qt::AltButton` | An Alt key on the keyboard is pressed.
`Qt::MetaButton` | A Meta key on the keyboard is pressed.
`Qt::Keypad` | A keypad button is pressed.

### enum Qt::CaseSensitivity

`Qt::CaseInsensitive` |
`Qt::CaseSensitive` |

### enum Qt::Corner

This enum type specifies a corner in a rectangle:

`Qt::TopLeftCorner` | The top-left corner of the rectangle.
`Qt::TopRightCorner` | The top-right corner of the rectangle.
`Qt::BottomLeftCorner` | The bottom-left corner of the rectangle.
`Qt::BottomRightCorner` | The bottom-right corner of the rectangle.

### enum Qt::CursorShape

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

`Qt::ArrowCursor` | standard arrow cursor
`Qt::UpArrowCursor` | upwards arrow
`Qt::CrossCursor` | crosshair
`Qt::WaitCursor` | hourglass/watch
`Qt::BusyCursor` | standard arrow with hourglass/watch
`Qt::IbeamCursor` | ibeam/text entry
`Qt::SizeVerCursor` | vertical resize
`Qt::SizeHorCursor` | horizontal resize
`Qt::SizeFDiagCursor` | diagonal resize ()
`Qt::SizeBDiagCursor` | diagonal resize (/)
`Qt::SizeAllCursor` | all directions resize
`Qt::BlankCursor` | blank/invisible cursor
`Qt::SplitVCursor` | vertical splitting
`Qt::SplitHCursor` | horizontal splitting
`Qt::PointingHandCursor` | a pointing hand
`Qt::ForbiddenCursor` | a slashed circle
`Qt::WhatsThisCursor` | an arrow with a question mark
`Qt::BitmapCursor` | ArrowCursor is the default for widgets in a normal state.

### enum Qt::DateFormat

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

### enum Qt::DayOfWeek

`Qt::Monday` |
`Qt::Tuesday` |
`Qt::Wednesday` |
`Qt::Thursday` |
`Qt::Friday` |
`Qt::Saturday` |
`Qt::Sunday` |

### enum Qt::Dock

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

`Qt::DockTop` | above the central widget, below the menu bar.
`Qt::DockBottom` | below the central widget, above the status bar.
`Qt::DockLeft` | to the left of the central widget.
`Qt::DockRight` | to the right of the central widget.
`Qt::DockMinimized` | 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.
`Qt::DockTornOff` | the dock window floats as its own top level window which always stays on top of the main window.
`Qt::DockUnmanaged` | not managed by a Q3MainWindow.

### enum Qt::DockWindowArea
typedef Qt::DockWindowAreas

`Qt::DockWindowAreaLeft` |
`Qt::DockWindowAreaRight` |
`Qt::DockWindowAreaTop` |
`Qt::DockWindowAreaBottom` |
`Qt::AllDockWindowAreas` |

The DockWindowAreas typedef can store a combination of DockWindowArea values.

### enum Qt::FocusPolicy

This enum type defines the various policies a widget can have with respect to acquiring keyboard focus.

`Qt::TabFocus` | the widget accepts focus by tabbing.
`Qt::ClickFocus` | the widget accepts focus by clicking.
`Qt::StrongFocus` | 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` | like Qt::StrongFocus plus the widget accepts focus by using the mouse wheel.
`Qt::NoFocus` | the widget does not accept focus.

### enum Qt::GlobalColor

Qt's 19 predefined QColor objects

`Qt::white` |
`Qt::black` |
`Qt::red` |
`Qt::darkRed` |
`Qt::green` |
`Qt::darkGreen` |
`Qt::blue` |
`Qt::darkBlue` |
`Qt::cyan` |
`Qt::darkCyan` |
`Qt::magenta` |
`Qt::darkMagenta` |
`Qt::yellow` |
`Qt::darkYellow` |
`Qt::gray` |
`Qt::darkGray` |
`Qt::lightGray` |
`Qt::color0` | 0 pixel value (for bitmaps)
`Qt::color1` | 1 pixel value (for bitmaps)

See also QColor.

### typedef Qt::HANDLE

### enum Qt::ImageConversionFlag
typedef 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):

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

Dithering mode preference for RGB channels:

`Qt::DiffuseDither` | (default) - A high-quality dither.
`Qt::OrderedDither` | A faster, more ordered dither.
`Qt::ThresholdDither` | No dithering; closest color is used.

Dithering mode preference for alpha channel:

`Qt::ThresholdAlphaDither` | (default) - No dithering.
`Qt::OrderedAlphaDither` | A faster, more ordered dither.
`Qt::DiffuseAlphaDither` | A high-quality dither.

Color matching versus dithering preference:

`Qt::PreferDither` | (default when converting to a pixmap) - Always dither 32-bit images when the image is converted to 8 bits.
`Qt::AvoidDither` | (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 typedef can store a combination of ImageConversionFlag values.

### enum Qt::Key

The key names used by Qt.

`Qt::Key_Escape` |
`Qt::Key_Tab` |
`Qt::Key_Backtab` |
`Qt::Key_Backspace` |
`Qt::Key_Return` |
`Qt::Key_Enter` |
`Qt::Key_Insert` |
`Qt::Key_Delete` |
`Qt::Key_Pause` |
`Qt::Key_Print` |
`Qt::Key_SysReq` |
`Qt::Key_Home` |
`Qt::Key_End` |
`Qt::Key_Left` |
`Qt::Key_Up` |
`Qt::Key_Right` |
`Qt::Key_Down` |
`Qt::Key_PageUp` |
`Qt::Key_Prior` |
`Qt::Key_Next` |
`Qt::Key_PageDown` |
`Qt::Key_Shift` |
`Qt::Key_Control` |
`Qt::Key_Meta` |
`Qt::Key_Alt` |
`Qt::Key_CapsLock` |
`Qt::Key_NumLock` |
`Qt::Key_ScrollLock` |
`Qt::Key_Clear` |
`Qt::Key_F1` |
`Qt::Key_F2` |
`Qt::Key_F3` |
`Qt::Key_F4` |
`Qt::Key_F5` |
`Qt::Key_F6` |
`Qt::Key_F7` |
`Qt::Key_F8` |
`Qt::Key_F9` |
`Qt::Key_F10` |
`Qt::Key_F11` |
`Qt::Key_F12` |
`Qt::Key_F13` |
`Qt::Key_F14` |
`Qt::Key_F15` |
`Qt::Key_F16` |
`Qt::Key_F17` |
`Qt::Key_F18` |
`Qt::Key_F19` |
`Qt::Key_F20` |
`Qt::Key_F21` |
`Qt::Key_F22` |
`Qt::Key_F23` |
`Qt::Key_F24` |
`Qt::Key_F25` |
`Qt::Key_F26` |
`Qt::Key_F27` |
`Qt::Key_F28` |
`Qt::Key_F29` |
`Qt::Key_F30` |
`Qt::Key_F31` |
`Qt::Key_F32` |
`Qt::Key_F33` |
`Qt::Key_F34` |
`Qt::Key_F35` |
`Qt::Key_Super_L` |
`Qt::Key_Super_R` |
`Qt::Key_Menu` |
`Qt::Key_Hyper_L` |
`Qt::Key_Hyper_R` |
`Qt::Key_Help` |
`Qt::Key_Space` |
`Qt::Key_Any` |
`Qt::Key_Exclam` |
`Qt::Key_QuoteDbl` |
`Qt::Key_NumberSign` |
`Qt::Key_Dollar` |
`Qt::Key_Percent` |
`Qt::Key_Ampersand` |
`Qt::Key_Apostrophe` |
`Qt::Key_ParenLeft` |
`Qt::Key_ParenRight` |
`Qt::Key_Asterisk` |
`Qt::Key_Plus` |
`Qt::Key_Comma` |
`Qt::Key_Minus` |
`Qt::Key_Period` |
`Qt::Key_Slash` |
`Qt::Key_0` |
`Qt::Key_1` |
`Qt::Key_2` |
`Qt::Key_3` |
`Qt::Key_4` |
`Qt::Key_5` |
`Qt::Key_6` |
`Qt::Key_7` |
`Qt::Key_8` |
`Qt::Key_9` |
`Qt::Key_Colon` |
`Qt::Key_Semicolon` |
`Qt::Key_Less` |
`Qt::Key_Equal` |
`Qt::Key_Greater` |
`Qt::Key_Question` |
`Qt::Key_At` |
`Qt::Key_A` |
`Qt::Key_B` |
`Qt::Key_C` |
`Qt::Key_D` |
`Qt::Key_E` |
`Qt::Key_F` |
`Qt::Key_G` |
`Qt::Key_H` |
`Qt::Key_I` |
`Qt::Key_J` |
`Qt::Key_K` |
`Qt::Key_L` |
`Qt::Key_M` |
`Qt::Key_N` |
`Qt::Key_O` |
`Qt::Key_P` |
`Qt::Key_Q` |
`Qt::Key_R` |
`Qt::Key_S` |
`Qt::Key_T` |
`Qt::Key_U` |
`Qt::Key_V` |
`Qt::Key_W` |
`Qt::Key_X` |
`Qt::Key_Y` |
`Qt::Key_Z` |
`Qt::Key_BracketLeft` |
`Qt::Key_Backslash` |
`Qt::Key_BracketRight` |
`Qt::Key_AsciiCircum` |
`Qt::Key_Underscore` |
`Qt::Key_QuoteLeft` |
`Qt::Key_BraceLeft` |
`Qt::Key_Bar` |
`Qt::Key_BraceRight` |
`Qt::Key_AsciiTilde` |

`Qt::Key_nobreakspace` |
`Qt::Key_exclamdown` |
`Qt::Key_cent` |
`Qt::Key_sterling` |
`Qt::Key_currency` |
`Qt::Key_yen` |
`Qt::Key_brokenbar` |
`Qt::Key_section` |
`Qt::Key_diaeresis` |
`Qt::Key_copyright` |
`Qt::Key_ordfeminine` |
`Qt::Key_guillemotleft` |
`Qt::Key_notsign` |
`Qt::Key_hyphen` |
`Qt::Key_registered` |
`Qt::Key_macron` |
`Qt::Key_degree` |
`Qt::Key_plusminus` |
`Qt::Key_twosuperior` |
`Qt::Key_threesuperior` |
`Qt::Key_acute` |
`Qt::Key_mu` |
`Qt::Key_paragraph` |
`Qt::Key_periodcentered` |
`Qt::Key_cedilla` |
`Qt::Key_onesuperior` |
`Qt::Key_masculine` |
`Qt::Key_guillemotright` |
`Qt::Key_onequarter` |
`Qt::Key_onehalf` |
`Qt::Key_threequarters` |
`Qt::Key_questiondown` |
`Qt::Key_Agrave` |
`Qt::Key_Aacute` |
`Qt::Key_Acircumflex` |
`Qt::Key_Atilde` |
`Qt::Key_Adiaeresis` |
`Qt::Key_Aring` |
`Qt::Key_AE` |
`Qt::Key_Ccedilla` |
`Qt::Key_Egrave` |
`Qt::Key_Eacute` |
`Qt::Key_Ecircumflex` |
`Qt::Key_Ediaeresis` |
`Qt::Key_Igrave` |
`Qt::Key_Iacute` |
`Qt::Key_Icircumflex` |
`Qt::Key_Idiaeresis` |
`Qt::Key_ETH` |
`Qt::Key_Ntilde` |
`Qt::Key_Ograve` |
`Qt::Key_Oacute` |
`Qt::Key_Ocircumflex` |
`Qt::Key_Otilde` |
`Qt::Key_Odiaeresis` |
`Qt::Key_multiply` |
`Qt::Key_Ooblique` |
`Qt::Key_Ugrave` |
`Qt::Key_Uacute` |
`Qt::Key_Ucircumflex` |
`Qt::Key_Udiaeresis` |
`Qt::Key_Yacute` |
`Qt::Key_THORN` |
`Qt::Key_ssharp` |
`Qt::Key_division` |
`Qt::Key_ydiaeresis` |

Multimedia keys

`Qt::Key_Back` |
`Qt::Key_Forward` |
`Qt::Key_Stop` |
`Qt::Key_Refresh` |

`Qt::Key_VolumeDown` |
`Qt::Key_VolumeMute` |
`Qt::Key_VolumeUp` |
`Qt::Key_BassBoost` |
`Qt::Key_BassUp` |
`Qt::Key_BassDown` |
`Qt::Key_TrebleUp` |
`Qt::Key_TrebleDown` |

`Qt::Key_MediaPlay` |
`Qt::Key_MediaStop` |
`Qt::Key_MediaPrevious` |
`Qt::Key_MediaNext` |
`Qt::Key_MediaRecord` |

`Qt::Key_HomePage` |
`Qt::Key_Favorites` |
`Qt::Key_Search` |
`Qt::Key_Standby` |
`Qt::Key_OpenUrl` |

`Qt::Key_LaunchMail` |
`Qt::Key_LaunchMedia` |
`Qt::Key_Launch0` |
`Qt::Key_Launch1` |
`Qt::Key_Launch2` |
`Qt::Key_Launch3` |
`Qt::Key_Launch4` |
`Qt::Key_Launch5` |
`Qt::Key_Launch6` |
`Qt::Key_Launch7` |
`Qt::Key_Launch8` |
`Qt::Key_Launch9` |
`Qt::Key_LaunchA` |
`Qt::Key_LaunchB` |
`Qt::Key_LaunchC` |
`Qt::Key_LaunchD` |
`Qt::Key_LaunchE` |
`Qt::Key_LaunchF` |

`Qt::Key_MediaLast` |

`Qt::Key_unknown` |

### enum Qt::MacintoshVersion

`Qt::MV_Unknown` | Version cannot be detected
`Qt::MV_9` | Mac OS 9
`Qt::MV_10_DOT_3` | Mac OS X 10.3
`Qt::MV_10_DOT_2` | Mac OS X 10.2
`Qt::MV_10_DOT_1` | Mac OS X 10.1
`Qt::MV_10_DOT_0` | Mac OS X 10.0
`Qt::MV_CHEETAH` | 10.0 Codename
`Qt::MV_PUMA` | 10.1 Codename
`Qt::MV_JAGUAR` | 10.2 Codename
`Qt::MV_PANTHER` | 10.3 Codename

### enum Qt::Modifier

This enum describes the keyboard modifier keys supported by Qt.

`Qt::SHIFT` | The Shift keys provided on all standard keyboards.
`Qt::META` | The Meta keys.
`Qt::CTRL` | The Ctrl keys.
`Qt::ALT` | The normal Alt keys, but not keys like AltGr.
`Qt::UNICODE_ACCEL` | The shortcut is specified as a Unicode code point, not as a Qt Key.

### enum Qt::Orientation

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

`Qt::Horizontal` |
`Qt::Vertical` |

Orientation is used with QScrollBar for example.

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

`Qt::FlatCap` | a square line end that does not cover the end point of the line.
`Qt::SquareCap` | a square line end that covers the end point and extends beyond it by half the line width.
`Qt::RoundCap` | a rounded line end.

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.

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

See also QPen.

### enum Qt::PenStyle

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

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

See also QPen.

### enum Qt::PixmapDrawingMode

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

### enum Qt::RectangleEdge
typedef Qt::RectangleEdges

`Qt::LeftEdge` |
`Qt::TopEdge` |
`Qt::RightEdge` |
`Qt::BottomEdge` |

The RectangleEdges typedef can store a combination of RectangleEdge values.

### enum Qt::ScrollBarPolicy

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

`Qt::ScrollBarAsNeeded` | QViewport shows a scroll bar when the content is too large to fit and not otherwise. This is the default.
`Qt::ScrollBarAlwaysOff` | QViewport never shows a scroll bar.
`Qt::ScrollBarAlwaysOn` | QViewport always shows a scroll bar.

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

### enum Qt::SettingsFormat

This enum type specifies the storage format used by QCoreSettings and QSettings.

`Qt::NativeFormat` | Store the settings using the most appropriate storage format for the platform. On Windows, this means the system registry; on Mac OS X, this means the CFPreferences API; on Unix/X11, this means textual configuration files in INI format.
`Qt::IniFormat` | Store the settings in INI files.

On Unix/X11, `NativeFormat` and `IniFormat` mean the same thing, except that the file extension is different (`.conf` for `NativeFormat`, `.ini` for `IniFormat`).

The INI file format is a standard Windows file format that Qt supports on all platforms.

### enum Qt::SettingsScope

This enum specifies whether settings are user-specific or shared by all users of the same system.

`Qt::UserScope` | Store settings in a location specific to the current user (e.g., in the user's home directory).
`Qt::SystemScope` | Store settings in a global location, so that all users on the same machine access the same set of settings.

### 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:

`Qt::ShortcutOnFocusWidget` | The shortcut is only triggered when its parent widget has focus.
`Qt::ShortcutOnActiveWindow` | The shortcut is triggered when its parent widget is a logical subwidget of the active top-level window.
`Qt::ShortcutOnApplication` | The shortcut is triggered when the application is active.

### enum Qt::SocketError

This enum describes the socket errors that can occur.

`Qt::ConnectionRefusedError` | The connection was refused by the peer (or timed out).
`Qt::RemoteHostClosedError` | The remote host closed the connection.
`Qt::HostNotFoundError` | The host address was not found.
`Qt::SocketAccessError` | The socket operation failed because the application lacked the required privileges.
`Qt::SocketResourceError` | The local system ran out of resources (e.g., too many sockets).
`Qt::SocketTimeoutError` | The socket operation timed out.
`Qt::DatagramTooLargeError` | The datagram was larger than the operating system's limit (which can be as low as 8192 bytes).
`Qt::NetworkError` | An error occurred with the network (e.g., the network cable was accidentally plugged out).
`Qt::AddressInUseError` | The address specified to QUdpSocket::bind() is already in use and was set to be exclusive.
`Qt::SocketAddressNotAvailableError` | The address specified to QUdpSocket::bind() does not belong to the host.
`Qt::UnsupportedSocketOperationError` | The requested socket operation is not supported by the local operating system (e.g., lack of IPv6 support).
`Qt::UnknownSocketError` | An unidentified error occurred.

See also QAbstractSocket::socketError().

### enum Qt::SocketState

This enum describes the different states in which a socket can be.

`Qt::UnconnectedState` | The socket is not connected.
`Qt::HostLookupState` | The socket is performing a host name lookup.
`Qt::ConnectingState` | The socket has started establishing a connection.
`Qt::ConnectedState` | A connection is established.
`Qt::BoundState` | The socket is bound to an address and port (for servers).
`Qt::ClosingState` | The socket is about to close (data may still be waiting to be written).
`Qt::ListeningState` | For internal use only.

See also QAbstractSocket::socketState().

### enum Qt::SocketType

This enum describes the transport layer protocol.

`Qt::TcpSocket` | TCP
`Qt::UdpSocket` | UDP
`Qt::UnknownSocketType` | Other than TCP and UDP

See also QAbstractSocket::socketType().

### enum Qt::SortOrder

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

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

### enum Qt::TextFlags

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

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

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.

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

### enum Qt::TimeSpec

`Qt::LocalTime` | Locale dependent time (Timezones and Daylight Savings Time).
`Qt::UTC` | Coordinated Universal Time, replaces Greenwich Mean Time.

### enum Qt::ToolBarArea
typedef Qt::ToolBarAreas

`Qt::ToolBarAreaLeft` |
`Qt::ToolBarAreaRight` |
`Qt::ToolBarAreaTop` |
`Qt::ToolBarAreaBottom` |
`Qt::AllToolBarAreas` |

The ToolBarAreas typedef can store a combination of ToolBarArea values.

### enum Qt::TransformationMode

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

`Qt::FastTransformation` | The transformation is performed quickly, with no smoothing.
`Qt::SmoothTransformation` | The resulting image has smoothed edges.

See also QImage::scale().

### enum Qt::UIEffect

`Qt::UI_General` |
`Qt::UI_AnimateMenu` |
`Qt::UI_FadeMenu` |
`Qt::UI_AnimateCombo` |
`Qt::UI_AnimateTooltip` |
`Qt::UI_FadeTooltip` |
`Qt::UI_AnimateToolBox` | Reserved

See also QApplication::setEffectEnabled().

### enum Qt::WFlag
typedef Qt::WFlags

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. (See the top-level example for an explanation and example of their use.)

The main types are

`Qt::WType_TopLevel` | indicates that this widget is a top-level widget, usually with a window-system frame and so on.

`Qt::WType_Dialog`

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. `WType_Dialog` implies `WType_TopLevel`. We refer to a top-level window that has a parent as a secondary window. (See also `WGroupLeader`.)

`Qt::WType_Popup` | 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. `WType_Popup` implies WType_TopLevel.
`Qt::WType_Desktop` | indicates that this widget is the desktop. See also `WPaintDesktop` below. `WType_Desktop` implies `WType_TopLevel`.

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:

`Qt::WStyle_Customize` | indicates that the `WStyle_*` flags should be used to build the window instead of the default flags.
`Qt::WStyle_NormalBorder` | gives the window a normal border. This cannot be combined with `WStyle_DialogBorder` or `WStyle_NoBorder`.
`Qt::WStyle_DialogBorder` | gives the window a thin dialog border. This cannot be combined with `WStyle_NormalBorder` or `WStyle_NoBorder`.

`Qt::WStyle_NoBorder`

produces a borderless window. Note that the user cannot move or resize a borderless window via the window system. This cannot be combined with `WStyle_NormalBorder` or `WStyle_DialogBorder`. On Windows, the flag works fine. 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. With `WX11BypassWM`, you can 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 setActiveWindow() manually).

`Qt::WStyle_Title` | gives the window a title bar.
`Qt::WStyle_SysMenu` | adds a window system menu.
`Qt::WStyle_Minimize` | adds a minimize button. Note that on Windows this has to be combined with `WStyle_SysMenu` for it to work.
`Qt::WStyle_Maximize` | adds a maximize button. Note that on Windows this has to be combined with `WStyle_SysMenu` for it to work.
`Qt::WStyle_MinMax` | is equal to `WStyle_Minimize|WStyle_Maximize`. Note that on Windows this has to be combined with `WStyle_SysMenu` to work.
`Qt::WStyle_ContextHelp` | adds a context help button to dialogs.

`Qt::WStyle_Tool`

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 passing `WStyle_StaysOnTop` 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 `WStyle_NoBorder`.

`Qt::WStyle_ToolTip` | makes the window a tooltip window (typically borderless with black text on a yellow background).
`Qt::WStyle_StaysOnTop` | 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 `WX11BypassWM` for this flag to work correctly.
`Qt::WStyle_Splash` | indicates that the window is a splash screen. On X11, we try to follow NETWM standard for a splash screen window if the window manager supports is otherwise it is equivalent to `WX11BypassWM`. On other platforms, it is equivalent to `WStyle_NoBorder` `|` `WMacSheet` `|` `WStyle_Tool` `|` `WWinOwnDC`

Modifier flags:

`Qt::WPaintDesktop` | gives this widget paint events for the desktop.
`Qt::WMouseNoMask` | indicates that even if the widget has a mask, it wants mouse events for its entire rectangle.

`Qt::WGroupLeader`

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.

Miscellaneous flags

`Qt::WShowModal` | see WType_Dialog

The WFlags typedef can store a combination of WFlag values.

### 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::hasAttribute(), although some have special convenience functions which are mentioned below.

`Qt::WA_DeleteOnClose` | makes Qt delete this widget when the widget has accepted closeEvent(), or when the widget tried to ignore closeEvent() but could not.
`Qt::WA_KeyCompression` | 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` | 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` | 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` | 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` | 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` | 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` | 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` | Indicates that the widgets has a palette of its own. This is set/cleared by QWidget::setPalette().
`Qt::WA_SetFont` | Indicates that the widgets has a font of its own. This is set/cleared by QWidget::setFont().
`Qt::WA_SetCursor` | Indicates that the widgets has a cursor of its own. This is set/cleared by QWidget::setCursor() and QWidget::unsetCursor().
`Qt::WA_SetForegroundRole` | Indicates that the widgets has an explicit foreground role. This is set/cleared by QWidget::setForegroundRole().
`Qt::WA_SetBackgroundRole` | Indicates that the widgets has an explicit background role. This is set/cleared by QWidget::setBackgroundRole().

`Qt::WA_NoBackground`

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`

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_StaticContents` | 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` | 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` | 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_WindowModified` | 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` | Indicates that the widget has an explicit size. This is set/cleared by QWidget::resize() and by QWidget::setGeometry().
`Qt::WA_Moved` | Indicates that the widget has an explicit position. This is set/cleared by QWidget::move() and by QWidget::setGeometry().
`Qt::WA_Mapped` | Indicates that the widget is mapped on screen. This is set/cleared by the Qt kernel.
`Qt::WA_NoMouseReplay` | 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` | 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` | 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_CompositeParent` | (see WA_CompositeChild)

`Qt::WA_CompositeChild`

Makes a child widget form a single 'composite' unit with its parent widget. User events such as mouse and keyboard events are always handled by the composite parent first and then forwarded to the composite child by the parent's QWidget::event() function. This makes it possible to intercept events meant for the child widget in a subclass of the parent widget. This is set/cleared by the widget's author.

`Qt::WA_CustomWhatsThis` | 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` | 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.

### enum Qt::WindowState

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

The states are

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

### enum Qt::WindowsVersion

`Qt::WV_32s` |
`Qt::WV_95` |
`Qt::WV_98` |
`Qt::WV_Me` |
`Qt::WV_DOS_based` |

`Qt::WV_NT` |
`Qt::WV_2000` |
`Qt::WV_XP` |
`Qt::WV_2003` |
`Qt::WV_NT_based` |

`Qt::WV_CE` |
`Qt::WV_CENET` |
`Qt::WV_CE_based` |