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>

Types


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::AlignAutoAligns according to the language. Left for most, right for Arabic and Hebrew.
Qt::AlignLeftAligns with the left edge.
Qt::AlignRightAligns with the right edge.
Qt::AlignHCenterCenters horizontally in the available space.
Qt::AlignJustifyJustifies 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::AlignTopAligns with the top.
Qt::AlignBottomAligns with the bottom.
Qt::AlignVCenterCenters vertically in the available space.

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

Qt::AlignCenterCenters 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::AnchorNamethe name attribute of the anchor. This attribute is used when scrolling to an anchor in the document.
Qt::AnchorHrefthe 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::IgnoreAspectRatioThe size is scaled freely. The aspect ratio is not preserved.
Qt::KeepAspectRatioThe size is scaled to a rectangle as large as possible inside a given rectangle, preserving the aspect ratio.
Qt::KeepAspectRatioByExpandingThe 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 
Brush Styles

See also QBrush.

enum Qt::ButtonState

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

Qt::NoButtonThe button state does not refer to any button (see QMouseEvent::button()).
Qt::LeftButtonThe 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::RightButtonThe right button.
Qt::MidButtonThe middle button.
Qt::ShiftButtonA Shift key on the keyboard is pressed.
Qt::ControlButtonA Ctrl key on the keyboard is pressed.
Qt::AltButtonAn Alt key on the keyboard is pressed.
Qt::MetaButtonA Meta key on the keyboard is pressed.
Qt::KeypadA keypad button is pressed.

enum Qt::CaseSensitivity

Qt::CaseInsensitive 
Qt::CaseSensitive 

enum Qt::Corner

This enum type specifies a corner in a rectangle:

Qt::TopLeftCornerThe top-left corner of the rectangle.
Qt::TopRightCornerThe top-right corner of the rectangle.
Qt::BottomLeftCornerThe bottom-left corner of the rectangle.
Qt::BottomRightCornerThe bottom-right corner of the rectangle.

enum Qt::CursorShape

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

Qt::ArrowCursorstandard arrow cursor
Qt::UpArrowCursorupwards arrow
Qt::CrossCursorcrosshair
Qt::WaitCursorhourglass/watch
Qt::BusyCursorstandard arrow with hourglass/watch
Qt::IbeamCursoribeam/text entry
Qt::SizeVerCursorvertical resize
Qt::SizeHorCursorhorizontal resize
Qt::SizeFDiagCursordiagonal resize ()
Qt::SizeBDiagCursordiagonal resize (/)
Qt::SizeAllCursorall directions resize
Qt::BlankCursorblank/invisible cursor
Qt::SplitVCursorvertical splitting
Qt::SplitHCursorhorizontal splitting
Qt::PointingHandCursora pointing hand
Qt::ForbiddenCursora slashed circle
Qt::WhatsThisCursoran arrow with a question mark
Qt::BitmapCursorArrowCursor is the default for widgets in a normal state.

Cursor Shapes

enum Qt::DateFormat

Qt::TextDateThe default Qt format.
Qt::ISODateISO 8601 extended format (YYYY-MM-DD, or with time, YYYY-MM-DDTHH:MM:SS).
Qt::LocalDateThe 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::DockTopabove the central widget, below the menu bar.
Qt::DockBottombelow the central widget, above the status bar.
Qt::DockLeftto the left of the central widget.
Qt::DockRightto the right of the central widget.
Qt::DockMinimizedthe 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::DockTornOffthe dock window floats as its own top level window which always stays on top of the main window.
Qt::DockUnmanagednot 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::TabFocusthe widget accepts focus by tabbing.
Qt::ClickFocusthe widget accepts focus by clicking.
Qt::StrongFocusthe 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::WheelFocuslike Qt::StrongFocus plus the widget accepts focus by using the mouse wheel.
Qt::NoFocusthe 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::color00 pixel value (for bitmaps)
Qt::color11 pixel value (for bitmaps)

Qt Colors

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::ColorOnlyThe pixmap is dithered/converted to the native display depth.
Qt::MonoOnlyThe 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::OrderedDitherA faster, more ordered dither.
Qt::ThresholdDitherNo dithering; closest color is used.

Dithering mode preference for alpha channel:

Qt::ThresholdAlphaDither(default) - No dithering.
Qt::OrderedAlphaDitherA faster, more ordered dither.
Qt::DiffuseAlphaDitherA 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_UnknownVersion cannot be detected
Qt::MV_9Mac OS 9
Qt::MV_10_DOT_3Mac OS X 10.3
Qt::MV_10_DOT_2Mac OS X 10.2
Qt::MV_10_DOT_1Mac OS X 10.1
Qt::MV_10_DOT_0Mac OS X 10.0
Qt::MV_CHEETAH10.0 Codename
Qt::MV_PUMA10.1 Codename
Qt::MV_JAGUAR10.2 Codename
Qt::MV_PANTHER10.3 Codename

enum Qt::Modifier

This enum describes the keyboard modifier keys supported by Qt.

Qt::SHIFTThe Shift keys provided on all standard keyboards.
Qt::METAThe Meta keys.
Qt::CTRLThe Ctrl keys.
Qt::ALTThe normal Alt keys, but not keys like AltGr.
Qt::UNICODE_ACCELThe 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::FlatCapa square line end that does not cover the end point of the line.
Qt::SquareCapa square line end that covers the end point and extends beyond it by half the line width.
Qt::RoundCapa rounded line end.

Pen Cap Styles

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::MiterJoinThe outer edges of the lines are extended to meet at an angle, and this area is filled.
Qt::BevelJoinThe triangular notch between the two lines is filled.
Qt::RoundJoinA circular arc between the two lines is filled.

Pen Join Styles

See also QPen.

enum Qt::PenStyle

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

Qt::NoPenno line at all. For example, QPainter::drawRect() fills but does not draw any boundary line.
Qt::SolidLinea plain line.
Qt::DashLinedashes separated by a few pixels.
Qt::DotLinedots separated by a few pixels.
Qt::DashDotLinealternate dots and dashes.
Qt::DashDotDotLineone dash, two dots, one dash, two dots.

Pen Styles

See also QPen.

enum Qt::PixmapDrawingMode

Qt::ComposePixmapThis mode will merge the source with the destination, including the alpha channels.
Qt::CopyPixmapCopies the source to the destination, including the mask. If the destination is not a pixmap, this operation is undefined.
Qt::CopyPixmapNoMaskDraws 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::ScrollBarAsNeededQViewport shows a scroll bar when the content is too large to fit and not otherwise. This is the default.
Qt::ScrollBarAlwaysOffQViewport never shows a scroll bar.
Qt::ScrollBarAlwaysOnQViewport 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::NativeFormatStore 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::IniFormatStore 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::UserScopeStore settings in a location specific to the current user (e.g., in the user's home directory).
Qt::SystemScopeStore 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::ShortcutOnFocusWidgetThe shortcut is only triggered when its parent widget has focus.
Qt::ShortcutOnActiveWindowThe shortcut is triggered when its parent widget is a logical subwidget of the active top-level window.
Qt::ShortcutOnApplicationThe shortcut is triggered when the application is active.

enum Qt::SocketError

This enum describes the socket errors that can occur.

Qt::ConnectionRefusedErrorThe connection was refused by the peer (or timed out).
Qt::RemoteHostClosedErrorThe remote host closed the connection.
Qt::HostNotFoundErrorThe host address was not found.
Qt::SocketAccessErrorThe socket operation failed because the application lacked the required privileges.
Qt::SocketResourceErrorThe local system ran out of resources (e.g., too many sockets).
Qt::SocketTimeoutErrorThe socket operation timed out.
Qt::DatagramTooLargeErrorThe datagram was larger than the operating system's limit (which can be as low as 8192 bytes).
Qt::NetworkErrorAn error occurred with the network (e.g., the network cable was accidentally plugged out).
Qt::AddressInUseErrorThe address specified to QUdpSocket::bind() is already in use and was set to be exclusive.
Qt::SocketAddressNotAvailableErrorThe address specified to QUdpSocket::bind() does not belong to the host.
Qt::UnsupportedSocketOperationErrorThe requested socket operation is not supported by the local operating system (e.g., lack of IPv6 support).
Qt::UnknownSocketErrorAn unidentified error occurred.

See also QAbstractSocket::socketError().

enum Qt::SocketState

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

Qt::UnconnectedStateThe socket is not connected.
Qt::HostLookupStateThe socket is performing a host name lookup.
Qt::ConnectingStateThe socket has started establishing a connection.
Qt::ConnectedStateA connection is established.
Qt::BoundStateThe socket is bound to an address and port (for servers).
Qt::ClosingStateThe socket is about to close (data may still be waiting to be written).
Qt::ListeningStateFor internal use only.

See also QAbstractSocket::socketState().

enum Qt::SocketType

This enum describes the transport layer protocol.

Qt::TcpSocketTCP
Qt::UdpSocketUDP
Qt::UnknownSocketTypeOther than TCP and UDP

See also QAbstractSocket::socketType().

enum Qt::SortOrder

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

Qt::AscendingOrderThe items are sorted ascending e.g. starts with 'AAA' ends with 'ZZZ' in Latin-1 locales
Qt::DescendingOrderThe 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::TextSingleLineTreats all whitespace as spaces and prints just one line.
Qt::TextDontClipIf it's impossible to stay within the given bounds, it prints outside.
Qt::TextExpandTabsMakes the U+0009 (ASCII tab) character move to the next tab stop.
Qt::TextShowMnemonicDisplays the string "&P" as P (see QButton for an example). For an ampersand, use "&&".
Qt::TextWordWrapBreaks lines at appropriate points, e.g. at word boundaries.
Qt::TextWrapAnywhereBreaks lines anywhere, even within words.
Qt::TextHideMnemonicSame as TextShowMnemonic but doesn't draw the underlines.
Qt::TextDontPrintTreat this text as "hidden" and don't print it.
Qt::TextIncludeTrailingSpacesDon't automatically delete trailing whitespace.
Qt::TextOverlineDraw a line over the text.
Qt::TextUnderlineUnderline the text.
Qt::TextStrikeOutDraw 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::PlainTextThe text string is interpreted as a plain text string.
Qt::RichTextThe text string is interpreted as a rich text string using the current QStyleSheet::defaultSheet().
Qt::AutoTextThe text string is interpreted as for RichText if QStyleSheet::mightBeRichText() returns true, otherwise as PlainText.
Qt::LogTextA special, limited text format which is only used by QTextEdit in an optimized mode.

enum Qt::TimeSpec

Qt::LocalTimeLocale dependent time (Timezones and Daylight Savings Time).
Qt::UTCCoordinated 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::FastTransformationThe transformation is performed quickly, with no smoothing.
Qt::SmoothTransformationThe 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_AnimateToolBoxReserved

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_TopLevelindicates that this widget is a top-level widget, usually with a window-system frame and so on.
Qt::WType_Dialogindicates 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_Popupindicates 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_Desktopindicates 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_Customizeindicates that the WStyle_* flags should be used to build the window instead of the default flags.
Qt::WStyle_NormalBordergives the window a normal border. This cannot be combined with WStyle_DialogBorder or WStyle_NoBorder.
Qt::WStyle_DialogBordergives the window a thin dialog border. This cannot be combined with WStyle_NormalBorder or WStyle_NoBorder.
Qt::WStyle_NoBorderproduces 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_Titlegives the window a title bar.
Qt::WStyle_SysMenuadds a window system menu.
Qt::WStyle_Minimizeadds a minimize button. Note that on Windows this has to be combined with WStyle_SysMenu for it to work.
Qt::WStyle_Maximizeadds a maximize button. Note that on Windows this has to be combined with WStyle_SysMenu for it to work.
Qt::WStyle_MinMaxis equal to WStyle_Minimize|WStyle_Maximize. Note that on Windows this has to be combined with WStyle_SysMenu to work.
Qt::WStyle_ContextHelpadds a context help button to dialogs.
Qt::WStyle_Toolmakes 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_ToolTipmakes the window a tooltip window (typically borderless with black text on a yellow background).
Qt::WStyle_StaysOnTopinforms 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_Splashindicates 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::WPaintDesktopgives this widget paint events for the desktop.
Qt::WMouseNoMaskindicates that even if the widget has a mask, it wants mouse events for its entire rectangle.
Qt::WGroupLeadermakes 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::WShowModalsee 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_DeleteOnClosemakes Qt delete this widget when the widget has accepted closeEvent(), or when the widget tried to ignore closeEvent() but could not.
Qt::WA_KeyCompressionEnables 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_PendingMoveEventIndicates that a move event is pending, e.g. when a hidden widget was moved. This is set/cleared by the Qt kernel
Qt::WA_PendingResizeEventIndicates that a resize event is pending, e.g. when a hidden widget was resized. This is set/cleared by the Qt kernel.
Qt::WA_UnderMouseIndicates 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_DisabledIndicates 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_ContentsPropagatedAllows 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_ForceDisabledIndicates 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_SetPaletteIndicates that the widgets has a palette of its own. This is set/cleared by QWidget::setPalette().
Qt::WA_SetFontIndicates that the widgets has a font of its own. This is set/cleared by QWidget::setFont().
Qt::WA_SetCursorIndicates that the widgets has a cursor of its own. This is set/cleared by QWidget::setCursor() and QWidget::unsetCursor().
Qt::WA_SetForegroundRoleIndicates that the widgets has an explicit foreground role. This is set/cleared by QWidget::setForegroundRole().
Qt::WA_SetBackgroundRoleIndicates that the widgets has an explicit background role. This is set/cleared by QWidget::setBackgroundRole().
Qt::WA_NoBackgroundIndicates 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_NoSystemBackgroundIndicates 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_StaticContentsIndicates 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_PaintOnScreenIndicates 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_PaintUnclippedMakes 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_WindowModifiedIndicates 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_ResizedIndicates that the widget has an explicit size. This is set/cleared by QWidget::resize() and by QWidget::setGeometry().
Qt::WA_MovedIndicates that the widget has an explicit position. This is set/cleared by QWidget::move() and by QWidget::setGeometry().
Qt::WA_MappedIndicates that the widget is mapped on screen. This is set/cleared by the Qt kernel.
Qt::WA_NoMouseReplayUsed 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_OutsideWSRangeIndicates 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_MacMetalStyleIndicates 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_CompositeChildMakes 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_CustomWhatsThisIndicates that the widget wants to continue operating normally in What's This mode This is set by the widget's author.
Qt::WA_LayoutOnEntireRectIndicates 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::WindowNoStateThe window has no state set (in normal state).
Qt::WindowMinimizedThe window is minimized (i.e. iconified).
Qt::WindowMaximizedThe window is maximized with a frame around it.
Qt::WindowFullScreenThe window fills the entire screen without any frame around it.
Qt::WindowActiveThe 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 


Copyright © 2004 Trolltech. Trademarks
Qt 4.0.0-tp2