CopperSpice API  1.9.2
Qt Class Reference

Namespace containing symbols, data types, and identifiers. More...

Public Typedefs

using Alignment = QFlags< AlignmentFlag >
 
using ApplicationStates = QFlags< ApplicationState >
 
using DockWidgetAreas = QFlags< DockWidgetArea >
 
using DropActions = QFlags< DropAction >
 
using Edges = QFlags< Edge >
 
using FindChildOptions = QFlags< FindChildOption >
 
using GestureFlags = QFlags< GestureFlag >
 
using HANDLE = void *
 
using ImageConversionFlags = QFlags< ImageConversionFlag >
 
using InputMethodHints = QFlags< InputMethodHint >
 
using InputMethodQueries = QFlags< InputMethodQuery >
 
using ItemFlags = QFlags< ItemFlag >
 
using KeyboardModifiers = QFlags< KeyboardModifier >
 
using MatchFlags = QFlags< MatchFlag >
 
using MouseButtons = QFlags< MouseButton >
 
using MouseEventFlags = QFlags< MouseEventFlag >
 
using Orientations = QFlags< Orientation >
 
using ScreenOrientations = QFlags< ScreenOrientation >
 
using TextInteractionFlags = QFlags< TextInteractionFlag >
 
using ToolBarAreas = QFlags< ToolBarArea >
 
using TouchPointStates = QFlags< TouchPointState >
 
using WindowFlags = QFlags< WindowType >
 
using WindowStates = QFlags< WindowState >
 

Public Types

enum  AlignmentFlag
 
enum  AnchorPoint
 
enum  ApplicationAttribute
 
enum  ApplicationState
 
enum  ArrowType
 
enum  AspectRatioMode
 
enum  Axis
 
enum  BGMode
 
enum  BrushStyle
 
enum  CaseSensitivity
 
enum  CheckState
 
enum  ClipOperation
 
enum  ConnectionType
 
enum  ContextMenuPolicy
 
enum  CoordinateSystem
 
enum  Corner
 
enum  CursorMoveStyle
 
enum  CursorShape
 
enum  DateFormat
 
enum  DayOfWeek
 
enum  DockWidgetArea
 
enum  DropAction
 
enum  Edge
 
enum  EnterKeyType
 
enum  EventPriority
 
enum  FillRule
 
enum  FindChildOption
 
enum  FocusPolicy
 
enum  FocusReason
 
enum  GestureFlag
 
enum  GestureState
 
enum  GestureType
 
enum  GlobalColor
 
enum  HitTestAccuracy
 
enum  ImageConversionFlag
 
enum  InputMethodHint
 
enum  InputMethodQuery
 
enum  ItemDataRole
 
enum  ItemFlag
 
enum  ItemSelectionMode
 
enum  ItemSelectionOperation
 
enum  Key
 
enum  KeyboardModifier : uint32_t
 
enum  LayoutDirection
 
enum  MaskMode
 
enum  MatchFlag
 
enum  MouseButton
 
enum  MouseEventFlag
 
enum  MouseEventSource
 
enum  NativeGestureType
 
enum  NavigationMode
 
enum  Orientation
 
enum  PenCapStyle
 
enum  PenJoinStyle
 
enum  PenStyle
 
enum  ScreenOrientation
 
enum  ScrollBarPolicy
 
enum  ScrollPhase
 
enum  ShortcutContext
 
enum  SizeHint
 
enum  SizeMode
 
enum  SortOrder
 
enum  TabFocusBehavior
 
enum  TextElideMode
 
enum  TextFlag
 
enum  TextFormat
 
enum  TextInteractionFlag
 
enum  TileRule
 
enum  TimerType
 
enum  TimeSpec
 
enum  ToolBarArea
 
enum  ToolButtonStyle
 
enum  TouchPointState
 
enum  TransformationMode
 
enum  UIEffect
 
enum  WhiteSpaceMode
 
enum  WidgetAttribute
 
enum  WindowFrameSection
 
enum  WindowModality
 
enum  WindowState
 
enum  WindowType
 

Static Public Methods

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

Detailed Description

This is a special namespace with contains symbols, data types, and identifiers.

Member Typedef Documentation

Typedef for QFlags<AlignmentFlag> which contains an OR combination of AlignmentFlag values.

Refer to Qt::AlignmentFlag for the enum documentation.

Typedef for QFlags<ApplicationState> which contains an OR combination of ApplicationState values.

Refer to Qt::ApplicationState for the enum documentation.

Typedef for QFlags<DockWidgetArea> which contains an OR combination of DockWidgetArea values.

Refer to Qt::DockWidgetArea for the enum documentation.

Typedef for QFlags<DropAction> which contains an OR combination of DropAction values.

Refer to Qt::DropAction for the enum documentation.

Typedef for QFlags<Edge> which contains an OR combination of Edge values.

Refer to Qt::Edge for the enum documentation.

Typedef for QFlags<FindChildOption> which contains an OR combination of FindChildOption values.

Refer to Qt::FindChildOption for the enum documentation.

Typedef for QFlags<GestureFlag> which contains an OR combination of GestureFlag values.

Refer to Qt::GestureFlag for the enum documentation.

This typedef is a platform specific handle used to represent system objects, it is not portable.

  • X11 - equivalent to unsigned long
  • Mac OS X - equivalent to void *
  • Windows - equivalent to DWORD

Typedef for QFlags<ImageConversionFlag> which contains an OR combination of ImageConversionFlag values.

Refer to Qt::ImageConversionFlag for the enum documentation.

Typedef for QFlags<InputMethodHint> which contains an OR combination of InputMethodHint values.

Refer to Qt::InputMethodHint for the enum documentation.

Typedef for QFlags<InputMethodQuery> which contains an OR combination of InputMethodQuery values.

Refer to Qt::InputMethodQuery for the enum documentation.

Typedef for QFlags<ItemFlag> which contains an OR combination of ItemFlag values.

Refer to Qt::ItemFlag for the enum documentation.

Typedef for QFlags<KeyboardModifier> which contains an OR combination of KeyboardModifier values.

Refer to Qt::KeyboardModifier for the enum documentation.

Typedef for QFlags<MatchFlag> which contains an OR combination of MatchFlag values.

Refer to Qt::MatchFlag for the enum documentation.

Typedef for QFlags<MouseButton> which contains an OR combination of MouseButton values.

Refer to Qt::MouseButton for the enum documentation.

Typedef for QFlags<MouseEventFlag> which contains an OR combination of MouseEventFlag values.

Refer to Qt::MouseEventFlag for the enum documentation.

Typedef for QFlags<Orientation> which contains an OR combination of Orientation values.

Refer to Qt::Orientation for the enum documentation.

Typedef for QFlags<ScreenOrientation> which contains an OR combination of ScreenOrientation values.

Refer to Qt::ScreenOrientation for the enum documentation.

Typedef for QFlags<TextInteractionFlag> which contains an OR combination of TextInteractionFlag values.

Refer to Qt::TextInteractionFlag for the enum documentation.

Typedef for QFlags<ToolBarArea> which contains an OR combination of ToolBarArea values.

Refer to Qt::ToolBarArea for the enum documentation.

Typedef for QFlags<TouchPointState> which contains an OR combination of TouchPointState values.

Refer to Qt::TouchPointState for the enum documentation.

Typedef for QFlags<WindowType> which contains an OR combination of WindowType values.

Refer to Qt::WindowType for the enum documentation.

Typedef for QFlags<WindowState> which contains an OR combination of WindowState values.

Refer to Qt::WindowState for the enum documentation.

Member Enumeration Documentation

This enum type is used to describe alignment. It contains horizontal and vertical flags which can be combined to produce the required effect. The Qt::TextElideMode enum can also be used in many situations to fine-tune the appearance of aligned text.

Conflicting combinations of flags have undefined meanings.

Horizontal flags:

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

Vertical flags:

ConstantValueDescription
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 at most one horizontal and one vertical flag at a time. Qt::AlignCenter counts as both horizontal and vertical.

Two-dimensional flag:

ConstantValueDescription
Qt::AlignCenter AlignVCenter | AlignHCenter Centers in both dimensions.

The following enum values are useful in applications which can be run in right-to-left mode:

ConstantValueDescription
Qt::AlignAbsolute 0x0010If the widget's layout direction is Qt::RightToLeft (default is Qt::LeftToRight), 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::AlignLeadingAlignLeft Synonym for Qt::AlignLeft.
Qt::AlignTrailingAlignRight Synonym for Qt::AlignRight.

Mask flags:

Constant Value
Qt::AlignHorizontal_Mask AlignLeft | AlignRight | AlignHCenter | AlignJustify | AlignAbsolute
Qt::AlignVertical_Mask AlignTop | AlignBottom | AlignVCenter

Specifies a side of a layout item which can be anchored. This is used by QGraphicsAnchorLayout.

Constant Value Description
Qt::AnchorLeft 0 Left side of a layout item.
Qt::AnchorHorizontalCenter 1 A "virtual" side that is centered between the left and the right side of a layout item.
Qt::AnchorRight 2 Right side of a layout item.
Qt::AnchorTop 3 Top side of a layout item.
Qt::AnchorVerticalCenter 4 A "virtual" side that is centered between the top and the bottom side of a layout item.
Qt::AnchorBottom 5 Bottom side of a layout item.
See also
QGraphicsAnchorLayout

This enum describes attributes that change the behavior of application-wide features. These are enabled and disabled using QCoreApplication::setAttribute(), and can be tested for with QCoreApplication::testAttribute().

ConstantValueDescription
Qt::AA_ImmediateWidgetCreation 0 Ensures that widgets are created as soon as they are constructed. By default, resources for widgets are allocated on demand to improve efficiency and minimize resource usage. Setting or clearing this attribute affects widgets constructed after the change. Setting it creates toplevel windows immediately. Therefore, if it is important to minimize resource consumption, do not set this attribute.
Qt::AA_MSWindowsUseDirect3DByDefault 1 This value is obsolete and has no effect.
Qt::AA_DontShowIconsInMenus 2 Actions with the Icon property will not be shown in any menus unless specifically set by the QAction::iconVisibleInMenu property. Menus that are currently open or menus already created in the native Mac OS X menubar may not pick up a change in this attribute. Changes in the QAction::iconVisibleInMenu property will always be picked up.
Qt::AA_NativeWindows 3 Ensures that widgets have native windows.
Qt::AA_DontCreateNativeWidgetSiblings 4 Ensures that siblings of native widgets stay non-native unless specifically set by the Qt::WA_NativeWindow attribute.
Qt::AA_MacPluginApplication 5 Stops Mac application from doing specific initializations which do not necessarily make sense when using CopperSpice to implement a plugin. This includes avoiding loading a nib file for the main menu and not taking possession of the native menu bar. Setting this attribute to true will also set the AA_DontUseNativeMenuBar attribute to true.
Qt::AA_DontUseNativeMenuBar 6 All menubars created while this attribute is set to true will not be used as a native menubar
Qt::AA_MacDontSwapCtrlAndMeta 7 By default on OS X, CopperSpice swaps the Control and Meta (Command) keys (i.e., whenever Control is pressed, CopperSpice sends Meta, and whenever Meta is pressed Control is sent). When this attribute is true, CopperSpice will not do the flip. QKeySequence::StandardShortcuts will also flip accordingly (i.e., QKeySequence::Copy will be Command+C on the keyboard regardless of the value set, though what is output for QKeySequence::toString(QKeySequence::PortableText) will be different).
Qt::AA_X11InitThreads 10 Calls XInitThreads() as part of the QApplication construction in order to make Xlib calls thread-safe. This attribute must be set before QApplication is constructed.

This enum type is used to specify the current state of the application.

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

Enum contains the Arrow types.

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

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

ConstantValueDescription
Qt::IgnoreAspectRatio 0 Size is scaled freely. The aspect ratio is not preserved.
Qt::KeepAspectRatio 1 Size is scaled to a rectangle as large as possible inside a given rectangle, preserving the aspect ratio.
Qt::KeepAspectRatioByExpanding 2 Size is scaled to a rectangle as small as possible outside a given rectangle, preserving the aspect ratio.
See also
QSize::scale(), QImage::scaled()
enum Qt::Axis

This enum type defines three values to represent the three axes in the cartesian coordinate system.

ConstantValueDescription
Qt::XAxis 0 X axis
Qt::YAxis 1 Y axis
Qt::ZAxis 2 Z axis
See also
QTransform::rotate(), QTransform::rotateRadians()
enum Qt::BGMode

Background mode:

ConstantValue
Qt::TransparentMode 0
Qt::OpaqueMode 1

This enum type defines the brush styles and the fill patterns for shapes drawn using QPainter.

ConstantValueDescription
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 5Half 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 9Horizontal lines.
Qt::VerPattern 10 Vertical lines.
Qt::CrossPattern 11 Crossing horizontal and vertical lines.
Qt::BDiagPattern 12 Backward diagonal lines.
Qt::FDiagPattern 13 Forward diagonal lines.
Qt::DiagCrossPattern 14 Crossing diagonal lines.
Qt::LinearGradientPattern 15 Linear gradient (set using a dedicated QBrush constructor).
Qt::ConicalGradientPattern 17 Conical gradient (set using a dedicated QBrush constructor).
Qt::RadialGradientPattern 16 Radial gradient (set using a dedicated QBrush constructor).
Qt::TexturePattern 24 Custom pattern (refer QBrush::setTexture()).
Brush Styles
See also
QBrush

This enum is used to specify behavior when searching.

ConstantValue
Qt::CaseInsensitive 0
Qt::CaseSensitive 1

This enum describes the state of checkable items, controls, and widgets.

ConstantValueDescription
Qt::Unchecked 0 Item is unchecked.
Qt::PartiallyChecked 1 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 Item is checked.
See also
QCheckBox, Qt::ItemFlags, Qt::ItemDataRole

This enum is used by QPainter.

ConstantValueDescription
Qt::NoClip 0 This operation turns clipping off.
Qt::ReplaceClip 1 Replaces the current clip path/rect/region with the one supplied in the function call.
Qt::IntersectClip 2 Intersects the current clip path/rect/region with the one supplied in the function call.
Qt::UniteClip 3 Unites the current clip path/rect/region with the one supplied in the function call.

This enum describes the types of connection which 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.

ConstantValueDescription
Qt::AutoConnection 0 If the signal is emitted from a different thread than the receiving object, the signal is queued and is the same as Qt::QueuedConnection. Otherwise the slot is invoked directly like a Qt::DirectConnection. The type of connection is determined when the signal is emitted. default
Qt::DirectConnection 1 Slot is invoked immediately when the signal is emitted.
Qt::QueuedConnection 2 Slot is invoked when control returns to the event loop of the receiver's thread. The slot is executed in the receiver's thread.
Qt::BlockingQueuedConnection 4 Same as Qt::QueuedConnection except the current thread blocks until the slot returns. Must only be used when the sender and receiver are in different threads. Violating this rule can cause a deadlock.
Qt::UniqueConnection 0x80Same as Qt::AutoConnection, however redundant connections are ignored
See also
QObject::connect(), CS_DECLARE_METATYPE(), Signals and Slots, Multithreading

This enum type defines the various policies a widget can have with respect to showing a context menu.

ConstantValueDescription
Qt::NoContextMenu 0 Widget does not feature a context menu context menu handling is deferred to the widget's parent.
Qt::DefaultContextMenu 1 QWidget::contextMenuEvent() handler is called
Qt::ActionsContextMenu 2 Displays its QWidget::actions() as context menu.
Qt::CustomContextMenu 3 Emits the QWidget::customContextMenuRequested() signal.
Qt::PreventContextMenu 4 Widget does not feature a context menu and in contrast to NoContextMenu, the handling is not deferred to the widget's parent. This means that all right mouse button events are guaranteed to be delivered to the widget itself through mousePressEvent(), and mouseReleaseEvent().

This enum specifies the coordinate system.

ConstantValueDescription
Qt::DeviceCoordinates 0 Coordinates are relative to the upper-left corner of the object's paint device.
Qt::LogicalCoordinates 1 Coordinates are relative to the upper-left corner of the object.
enum Qt::Corner

This enum type specifies a corner in a rectangle:

ConstantValueDescription
Qt::TopLeftCorner0x00000Top-left corner of the rectangle.
Qt::TopRightCorner0x00001Top-right corner of the rectangle.
Qt::BottomLeftCorner0x00002Bottom-left corner of the rectangle.
Qt::BottomRightCorner0x00003Bottom-right corner of the rectangle.

This enum describes the movement style available to text cursors. The options are:

ConstantValueDescription
Qt::LogicalMoveStyle0Within a left-to-right text block, decrease cursor position when pressing left arrow key, increase cursor position when pressing the right arrow key. If the text block is right-to-left, the opposite behavior applies.
Qt::VisualMoveStyle1Pressing the left arrow key will always cause the cursor to move left, regardless of the text's writing direction. Pressing the right arrow key will always cause the cursor to move right.

This enum type defines the various cursors which can be used. The standard arrow cursor is the default for widgets in a normal state.

ConstantValueDescription
Qt::ArrowCursor0 The standard arrow cursor.
Qt::UpArrowCursor1 An arrow pointing upwards toward the top of the screen.
Qt::CrossCursor2 A crosshair cursor, typically used to help the user accurately select a point on the screen.
Qt::WaitCursor3 An hourglass or watch cursor, usually shown during operations that prevent the user from interacting with the application.
Qt::IBeamCursor4 A caret or ibeam cursor, indicating that a widget can accept and display text input.
Qt::SizeVerCursor5 A cursor used for elements that are used to vertically resize top-level windows.
Qt::SizeHorCursor6 A cursor used for elements that are used to horizontally resize top-level windows.
Qt::SizeBDiagCursor7 A cursor used for elements that are used to diagonally resize top-level windows at their top-right and bottom-left corners.
Qt::SizeFDiagCursor8 A cursor used for elements that are used to diagonally resize top-level windows at their top-left and bottom-right corners.
Qt::SizeAllCursor9 A cursor used for elements that are used to resize top-level windows in any direction.
Qt::BlankCursor10A blank/invisible cursor, typically used when the cursor shape needs to be hidden.
Qt::SplitVCursor11 A cursor used for vertical splitters, indicating that a handle can be dragged horizontally to adjust the use of available space.
Qt::SplitHCursor12 A cursor used for horizontal splitters, indicating that a handle can be dragged vertically to adjust the use of available space.
Qt::PointingHandCursor13 A pointing hand cursor that is typically used for clickable elements such as hyperlinks.
Qt::ForbiddenCursor14 A slashed circle cursor, typically used during drag and drop operations to indicate that dragged content can not be dropped on particular widgets or inside certain regions.
Qt::OpenHandCursor17 A cursor representing an open hand, typically used to indicate that the area under the cursor is the visible part of a canvas that the user can click and drag in order to scroll around.
Qt::ClosedHandCursor18 A cursor representing a closed hand, typically used to indicate that a dragging operation is in progress that involves scrolling.
Qt::WhatsThisCursor15 An arrow with a question mark, typically used to indicate the presence of What's This? help for a widget.
Qt::BusyCursor16 An hourglass or watch cursor, usually shown during operations that allow the user to interact with the application while they are performed in the background.
Qt::DragMoveCursor20A cursor that is usually used when dragging an item.
Qt::DragCopyCursor19A cursor that is usually used when dragging an item to copy it.
Qt::DragLinkCursor21A cursor that is usually used when dragging an item to make a link to it.
Qt::BitmapCursor24 

This enum is used to specify the date format.

ConstantValueDescription
Qt::TextDate 0 Default format, includes the day and month name, the day number in the month, and the year in full. Day and month names will be short, localized names. Equivalent to using the date format string, "ddd MMM d yyyy". Refer to QDate::toString() for more information.
Qt::ISODate 1 ISO 8601 extended format: either YYYY-MM-DD for dates or YYYY-MM-DDTHH:mm:ss, YYYY-MM-DDTHH:mm:ssTZD (e.g., 1997-07-16T19:20:30+01:00) for combined dates and times
Qt::SystemLocaleDate 2 Deprecated, use Qt::SystemLocaleShortDate or Qt::SystemLocaleLongDate if you want long dates
Qt::LocalDate Qt::SystemLocaleDate Deprecated, use Qt::SystemLocaleShortDate or Qt::SystemLocaleLongDate if you want long dates
Qt::LocaleDate 3 Deprecated, use Qt::DefaultLocaleShortDate instead or Qt::DefaultLocaleLongDate if you want long dates
Qt::SystemLocaleShortDate 4 Short format used by the operating system
Qt::SystemLocaleLongDate 5Long format used by the operating system
Qt::DefaultLocaleShortDate 6Short format specified by the application's locale
Qt::DefaultLocaleLongDate 7Long format used by the application's locale
Qt::RFC2822Date 8Format used by email standard
Note
For ISODate formats, each Y, M and D represents a single digit of the year, month and day used to specify the date. Each H, M and S represents a single digit of the hour, minute and second used to specify the time. The presence of a literal T character is used to separate the date and time when both are specified.

This enum is a list of the days of the week.

ConstantValue
Qt::Monday1
Qt::Tuesday2
Qt::Wednesday3
Qt::Thursday4
Qt::Friday5
Qt::Saturday6
Qt::Sunday7

This enum is used to specify the location of a widget.

ConstantValue
Qt::LeftDockWidgetArea0x1
Qt::RightDockWidgetArea0x2
Qt::TopDockWidgetArea0x4
Qt::BottomDockWidgetArea0x8
Qt::AllDockWidgetAreasDockWidgetArea_Mask
Qt::NoDockWidgetArea0

This enum is used with Drag and Drop.

ConstantValueDescription
Qt::CopyAction 0x1 Copy the data to the target.
Qt::MoveAction 0x2 Move the data from the source to the target.
Qt::LinkAction 0x4 Create a link from the source to the target.
Qt::ActionMask 0xff  
Qt::IgnoreAction 0x0 Ignore the action (do nothing with the data).
Qt::TargetMoveAction 0x8002 On Windows this value is used when the ownership of the D&D data should be taken over by the target application, For example, when the source application should not delete the data. On X11 this value is used to do a move. TargetMoveAction is not used on the Mac.
enum Qt::Edge

This enum type specifies an edge in a rectangle.

ConstantValueDescription
Qt::TopEdge 0x00001 Top edge of the rectangle.
Qt::LeftEdge 0x00002 Left edge of the rectangle.
Qt::RightEdge 0x00004 Right edge of the rectangle.
Qt::BottomEdge 0x00008 Bottom edge of the rectangle.

This can be used to alter the appearance of the Return key on an on-screen keyboard. Not all of these values are supported on all platforms. For unsupported values the default key will be used instead.

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

This enum can be used to specify event priorities.

ConstantValueDescription
Qt::HighEventPriority1Events with this priority are sent before events with NormalEventPriority or LowEventPriority.
Qt::NormalEventPriority0Events with this priority are sent after events with HighEventPriority, but before events with LowEventPriority.
Qt::LowEventPriority-1Events with this priority are sent after events with HighEventPriority or NormalEventPriority.

These values are provided for convenience since event priorities can be any value between INT_MAX and INT_MIN, inclusive. For example, you can define custom priorities as being relative to each other.

enum CustomEventPriority
{
// An important event
ImportantEventPriority = Qt::HighEventPriority,
// A more important event
MoreImportantEventPriority = ImportantEventPriority + 1,
// A critical event
CriticalEventPriority = 100 * MoreImportantEventPriority,
// Not that important
StatusEventPriority = Qt::LowEventPriority,
// These are less important than Status events
IdleProcessingDoneEventPriority = StatusEventPriority - 1
};
See also
QCoreApplication::postEvent()

Specifies which method should be used to fill the paths and polygons.

ConstantValueDescription
Qt::OddEvenFill 0Specifies 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 1Specifies 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.

Describes options which are used when finding children of a QObject.

ConstantValueDescription
Qt::FindDirectChildrenOnly 0x0 Looks only at the direct children of the object
Qt::FindChildrenRecursively 0x1 Looks at all children of the object (recursive search)

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

ConstantValueDescription
Qt::TabFocus 0x1 Widget accepts focus by tabbing.
Qt::ClickFocus 0x2 Widget accepts focus by clicking.
Qt::StrongFocus TabFocus |
ClickFocus |
0x8
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
Similar to Qt::StrongFocus plus the widget accepts focus by using the mouse wheel.
Qt::NoFocus 0 Does not accept focus

This enum specifies why the focus changed. It will be passed through QWidget::setFocus and can be retrieved in the QFocusEvent sent to the widget upon focus change.

ConstantValueDescription
Qt::MouseFocusReason0A mouse action occurred.
Qt::TabFocusReason1The Tab key was pressed.
Qt::BacktabFocusReason2A Backtab occurred. The input for this may include the Shift or Control keys; e.g. Shift+Tab.
Qt::ActiveWindowFocusReason3The window system made this window either active or inactive.
Qt::PopupFocusReason4The application opened/closed a pop-up that grabbed/released the keyboard focus.
Qt::ShortcutFocusReason5The user typed a label's buddy shortcut
Qt::MenuBarFocusReason6The menu bar took focus.
Qt::OtherFocusReason7Another reason, usually application-specific.
See also
Keyboard Focus

This enum type describes additional flags that can be used when subscribing to a gesture.

ConstantValueDescription
Qt::DontStartGestureOnChildren 0x01 By default gestures can start on the widget or over any of its children. Use this flag to disable this and allow a gesture to start on the widget only.
Qt::ReceivePartialGestures 0x02 Allows any ignored gesture events to be propagated to parent widgets which have specified this hint. By default only gestures that are in the Qt::GestureStarted state are propagated and the widget always gets the full gesture sequence starting with a gesture in the Qt::GestureStarted state and ending with a gesture in the Qt::GestureFinished or Qt::GestureCanceled states.
Qt::IgnoredGesturesPropagateToParent 0x04 This flag allows you to fine-tune gesture event propagation. By setting the flag when QGraphicsobject::grabGesture() "grabbing" a gesture all ignored partial gestures will propagate to their parent items.
See also
QWidget::grabGesture(), QGraphicsObject::grabGesture()

This enum type describes the state of a gesture.

ConstantValueDescription
Qt::GestureStarted1A continuous gesture has started.
Qt::GestureUpdated2A gesture continues.
Qt::GestureFinished3A gesture has finished.
Qt::GestureCanceled4A gesture was canceled.
See also
QGesture

This enum type describes the standard gestures.

ConstantValueDescription
Qt::TapGesture1Tap gesture.
Qt::TapAndHoldGesture2Tap-And-Hold (Long-Tap) gesture.
Qt::PanGesture3Pan gesture.
Qt::PinchGesture4Pinch gesture.
Qt::SwipeGesture5Swipe gesture.
Qt::CustomGesture0x0100A flag that can be used to test if the gesture is a user-defined gesture ID.

User-defined gestures are registered with the QGestureRecognizer::registerRecognizer() function which generates a custom gesture ID with the Qt::CustomGesture flag set.

See also
QGesture, QWidget::grabGesture(), QGraphicsObject::grabGesture()

These are the predefined QColor objects.

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

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

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

This enum is defined in the <QTextDocument> header file.

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:

ConstantValueDescription
Qt::AutoColor0x00000000(default) - If the image has QImage::depth() 1 and contains only black and white pixels, the pixmap becomes monochrome.
Qt::MonoOnly0x00000002The pixmap becomes monochrome. If necessary, it is dithered using the chosen dithering algorithm.
Qt::ColorOnly0x00000003The pixmap is dithered/converted to the QPixmap::defaultDepth() native display depth.

Dithering mode preference for RGB channels:

ConstantValueDescription
Qt::DiffuseDither0x00000000(default) - A high-quality dither.
Qt::OrderedDither0x00000010A faster, more ordered dither.
Qt::ThresholdDither0x00000020No dithering; closest color is used.

Dithering mode preference for alpha channel:

ConstantValueDescription
Qt::ThresholdAlphaDither0x00000000(default) - No dithering.
Qt::OrderedAlphaDither0x00000004A faster, more ordered dither.
Qt::DiffuseAlphaDither0x00000008A high-quality dither.

Color matching versus dithering preference:

ConstantValueDescription
Qt::PreferDither0x00000040(default when converting to a pixmap) - Always dither 32-bit images when the image is converted to 8 bits.
Qt::AvoidDither0x00000080(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.
Qt::NoOpaqueDetection0x00000100Do not check whether the image contains non-opaque pixels. Use this if you know that the image is semi-transparent and you want to avoid the overhead of checking the pixels in the image until a non-opaque pixel is found, or if you want the pixmap to retain an alpha channel for some other reason. If the image has no alpha channel this flag has no effect.

Do not do any format conversions on the image. Can be useful when converting a QImage to a QPixmap for a one-time rendering operation for example.

This enum is used for multilingual input.

ConstantValueDescription
Qt::ImhNone0x0No hints.

Flags that alter the behavior:

ConstantValueDescription
Qt::ImhHiddenText0x1Characters should be hidden, as is typically used when entering passwords. This is automatically set when setting QLineEdit::echoMode to Password.
Qt::ImhNoAutoUppercase0x2The input method should not try to automatically switch to upper case when a sentence ends.
Qt::ImhPreferNumbers0x4Numbers are preferred (but not required).
Qt::ImhPreferUppercase0x8Upper case letters are preferred (but not required).
Qt::ImhPreferLowercase0x10Lower case letters are preferred (but not required).
Qt::ImhNoPredictiveText0x20Do not use predictive text (i.e. dictionary lookup) while typing.

Flags that restrict input (exclusive flags):

ConstantValueDescription
Qt::ImhDigitsOnly0x10000Only digits are allowed.
Qt::ImhFormattedNumbersOnly0x20000Only number input is allowed. This includes decimal point and minus sign.
Qt::ImhUppercaseOnly0x40000Only upper case letter input is allowed.
Qt::ImhLowercaseOnly0x80000Only lower case letter input is allowed.
Qt::ImhDialableCharactersOnly0x100000Only characters suitable for phone dialing are allowed.
Qt::ImhEmailCharactersOnly0x200000Only characters suitable for email addresses are allowed.
Qt::ImhUrlCharactersOnly0x400000Only characters suitable for URLs are allowed.

Masks:

ConstantValueDescription
Qt::ImhExclusiveInputMask0xffff0000 This mask yields nonzero if any of the exclusive flags are used.

If several exclusive flags are OR'ed together, the resulting character set will consist of the union of the specified sets. For instance specifying ImhNumbersOnly and ImhUppercaseOnly would yield a set consisting of numbers and uppercase letters.

See also
QGraphicsItem::inputMethodHints()

This enum is used to specify the type of input.

ConstantValueDescription
Qt::ImMicroFocus 0The rectangle covering the area of the input cursor in widget coordinates.
Qt::ImFont1 The currently used font for text input.
Qt::ImCursorPosition2 The logical position of the cursor within the text surrounding the input area
Qt::ImSurroundingText3 The plain text around the input area, for example the current paragraph.
Qt::ImCurrentSelection4 The currently selected text.
Qt::ImMaximumTextLength5 The maximum number of characters that the widget can hold. If there is no limit QVariant() is returned.
Qt::ImAnchorPosition6 The position of the selection anchor. This may be less or greater than ImCursorPosition, depending on which side of selection the cursor is. If there is no selection, it returns the same as ImCursorPosition.

Each item in the model has a set of data elements associated with it and each one with its own role. The roles are used by the view to indicate to the model which type of data it needs. Custom models should return the appropriate data for these roles.

  • General purpose roles
ConstantValueDescription
Qt::DisplayRole0The key data to be rendered in the form of text. (QString)
Qt::DecorationRole1The data to be rendered as a decoration in the form of an icon. (QColor, QIcon or QPixmap)
Qt::EditRole2The data in a form suitable for editing in an editor. (QString)
Qt::ToolTipRole3The data displayed in the item's tooltip. (QString)
Qt::StatusTipRole4The data displayed in the status bar. (QString)
Qt::WhatsThisRole5The data displayed for the item in "What's This?" mode. (QString)
Qt::SizeHintRole13The size hint for the item that will be supplied to views. (QSize)
  • Roles describing appearance and meta data
ConstantValueDescription
Qt::FontRole 6 The font used for items rendered with the default delegate. (QFont)
Qt::TextAlignmentRole 7The alignment of the text for items rendered with the default delegate. (Qt::AlignmentFlag)
Qt::BackgroundRole8 The background brush used for items rendered with the default delegate. (QBrush)
Qt::BackgroundColorRole8 This role is obsolete. Use BackgroundRole instead.
Qt::ForegroundRole9 The foreground brush (text color, typically) used for items rendered with the default delegate. (QBrush)
Qt::TextColorRole9 This role is obsolete. Use ForegroundRole instead.
Qt::CheckStateRole10 This role is used to obtain the checked state of an item. (Qt::CheckState)
Qt::InitialSortOrderRole14 This role is used to obtain the initial sort order of a header view section. (Qt::SortOrder).
  • Accessibility roles
ConstantValueDescription
Qt::AccessibleTextRole 11 Text used by accessibility extensions and plugins, such as screen readers. (QString)
Qt::AccessibleDescriptionRole 12 Description of the item for accessibility purposes. (QString)
  • User roles

It is the developers responsibility to decide how to use this role.

ConstantValueDescription
Qt::UserRole32 First role which is available for application specific purposes

This enum describes the properties of an item:

ConstantValueDescription
Qt::NoItemFlags 0It does not have any properties set.
Qt::ItemIsSelectable 1It can be selected.
Qt::ItemIsEditable 2It can be edited.
Qt::ItemIsDragEnabled 4It can be dragged.
Qt::ItemIsDropEnabled 8It can be used as a drop target.
Qt::ItemIsUserCheckable 16It can be checked or unchecked by the user.
Qt::ItemIsEnabled 32The user can interact with the item.
Qt::ItemIsTristate 64The item is checkable with three separate states.

Checkable items need to be given both a suitable set of flags and an initial state, indicating whether the item is checked or not. This is handled automatically for model/view components, but needs to be explicitly set for instances of QListWidgetItem, QTableWidgetItem, and QTreeWidgetItem.

See also
QAbstractItemModel

This enum is used in QGraphicsItem, QGraphicsScene and QGraphicsView to specify how items are selected, or how to determine if a shapes and items collide.

ConstantValueDescription
Qt::ContainsItemShape 0x0 The output list contains only items whose shape is fully contained inside the selection area. Items that intersect with the area's outline are not included.
Qt::IntersectsItemShape 0x1 The output list contains both items whose shape is fully contained inside the selection area, and items that intersect with the area's outline. This is a common mode for rubber band selection.
Qt::ContainsItemBoundingRect 0x2 The output list contains only items whose bounding rectangle is fully contained inside the selection area. Items that intersect with the area's outline are not included.
Qt::IntersectsItemBoundingRect 0x3 The output list contains both items whose bounding rectangle is fully contained inside the selection area, and items that intersect with the area's outline. This method is commonly used for determining areas that need redrawing.
See also
QGraphicsScene::items(), QGraphicsScene::collidingItems(), QGraphicsView::items(), QGraphicsItem::collidesWithItem(), QGraphicsItem::collidesWithPath()

This enum is used in QGraphicsScene to specify what to do with currently selected items when setting a selection area.

ConstantValueDescription
Qt::ReplaceSelection 0 Currently selected items are replaced by items in the selection area
Qt::AddToSelection 1 Items in the selection area are added to the currently selected items
See also
QGraphicsScene::setSelectionArea()
enum Qt::Key

This enum contains all recognized keycodes.

ConstantValueDescription
Qt::Key_Escape0x01000000 
Qt::Key_Tab0x01000001 
Qt::Key_Backtab0x01000002 
Qt::Key_Backspace0x01000003 
Qt::Key_Return0x01000004 
Qt::Key_Enter0x01000005Typically located on the keypad.
Qt::Key_Insert0x01000006 
Qt::Key_Delete0x01000007 
Qt::Key_Pause0x01000008 The Pause/Break key, not related to pausing media
Qt::Key_Print0x01000009 
Qt::Key_SysReq0x0100000a 
Qt::Key_Clear0x0100000b 
Qt::Key_Home0x01000010 
Qt::Key_End0x01000011 
Qt::Key_Left0x01000012 
Qt::Key_Up0x01000013 
Qt::Key_Right0x01000014 
Qt::Key_Down0x01000015 
Qt::Key_PageUp0x01000016 
Qt::Key_PageDown0x01000017 
Qt::Key_Shift0x01000020 
Qt::Key_Control0x01000021 On Mac OS X, corresponds to the Command keys.
Qt::Key_Meta0x01000022 On Mac OS X, corresponds to the Control keys. On Windows keyboards, mapped to the Windows key.
Qt::Key_Alt0x01000023 
Qt::Key_AltGr0x01001103 On Windows, when the KeyDown event for this key is sent, the Ctrl+Alt modifiers are also set.
Qt::Key_CapsLock0x01000024 
Qt::Key_NumLock0x01000025 
Qt::Key_ScrollLock0x01000026 
Qt::Key_F10x01000030 
Qt::Key_F20x01000031 
Qt::Key_F30x01000032 
Qt::Key_F40x01000033 
Qt::Key_F50x01000034 
Qt::Key_F60x01000035 
Qt::Key_F70x01000036 
Qt::Key_F80x01000037 
Qt::Key_F90x01000038 
Qt::Key_F100x01000039 
Qt::Key_F110x0100003a 
Qt::Key_F120x0100003b 
Qt::Key_F130x0100003c 
Qt::Key_F140x0100003d 
Qt::Key_F150x0100003e 
Qt::Key_F160x0100003f 
Qt::Key_F170x01000040 
Qt::Key_F180x01000041 
Qt::Key_F190x01000042 
Qt::Key_F200x01000043 
Qt::Key_F210x01000044 
Qt::Key_F220x01000045 
Qt::Key_F230x01000046 
Qt::Key_F240x01000047 
Qt::Key_F250x01000048 
Qt::Key_F260x01000049 
Qt::Key_F270x0100004a 
Qt::Key_F280x0100004b 
Qt::Key_F290x0100004c 
Qt::Key_F300x0100004d 
Qt::Key_F310x0100004e 
Qt::Key_F320x0100004f 
Qt::Key_F330x01000050 
Qt::Key_F340x01000051 
Qt::Key_F350x01000052 
Qt::Key_Super_L0x01000053 
Qt::Key_Super_R0x01000054 
Qt::Key_Menu0x01000055 
Qt::Key_Hyper_L0x01000056 
Qt::Key_Hyper_R0x01000057 
Qt::Key_Help0x01000058 
Qt::Key_Direction_L0x01000059 
Qt::Key_Direction_R0x01000060 
Qt::Key_Space0x20 
Qt::Key_AnyKey_Space 
Qt::Key_Exclam0x21 
Qt::Key_QuoteDbl0x22 
Qt::Key_NumberSign0x23 
Qt::Key_Dollar0x24 
Qt::Key_Percent0x25 
Qt::Key_Ampersand0x26 
Qt::Key_Apostrophe0x27 
Qt::Key_ParenLeft0x28 
Qt::Key_ParenRight0x29 
Qt::Key_Asterisk0x2a 
Qt::Key_Plus0x2b 
Qt::Key_Comma0x2c 
Qt::Key_Minus0x2d 
Qt::Key_Period0x2e 
Qt::Key_Slash0x2f 
Qt::Key_00x30 
Qt::Key_10x31 
Qt::Key_20x32 
Qt::Key_30x33 
Qt::Key_40x34 
Qt::Key_50x35 
Qt::Key_60x36 
Qt::Key_70x37 
Qt::Key_80x38 
Qt::Key_90x39 
Qt::Key_Colon0x3a 
Qt::Key_Semicolon0x3b 
Qt::Key_Less0x3c 
Qt::Key_Equal0x3d 
Qt::Key_Greater0x3e 
Qt::Key_Question0x3f 
Qt::Key_At0x40 
Qt::Key_A0x41 
Qt::Key_B0x42 
Qt::Key_C0x43 
Qt::Key_D0x44 
Qt::Key_E0x45 
Qt::Key_F0x46 
Qt::Key_G0x47 
Qt::Key_H0x48 
Qt::Key_I0x49 
Qt::Key_J0x4a 
Qt::Key_K0x4b 
Qt::Key_L0x4c 
Qt::Key_M0x4d 
Qt::Key_N0x4e 
Qt::Key_O0x4f 
Qt::Key_P0x50 
Qt::Key_Q0x51 
Qt::Key_R0x52 
Qt::Key_S0x53 
Qt::Key_T0x54 
Qt::Key_U0x55 
Qt::Key_V0x56 
Qt::Key_W0x57 
Qt::Key_X0x58 
Qt::Key_Y0x59 
Qt::Key_Z0x5a 
Qt::Key_BracketLeft0x5b 
Qt::Key_Backslash0x5c 
Qt::Key_BracketRight0x5d 
Qt::Key_AsciiCircum0x5e 
Qt::Key_Underscore0x5f 
Qt::Key_QuoteLeft0x60 
Qt::Key_BraceLeft0x7b 
Qt::Key_Bar0x7c 
Qt::Key_BraceRight0x7d 
Qt::Key_AsciiTilde0x7e 
Qt::Key_nobreakspace0x0a0 
Qt::Key_exclamdown0x0a1 
Qt::Key_cent0x0a2 
Qt::Key_sterling0x0a3 
Qt::Key_currency0x0a4 
Qt::Key_yen0x0a5 
Qt::Key_brokenbar0x0a6 
Qt::Key_section0x0a7 
Qt::Key_diaeresis0x0a8 
Qt::Key_copyright0x0a9 
Qt::Key_ordfeminine0x0aa 
Qt::Key_guillemotleft0x0ab 
Qt::Key_notsign0x0ac 
Qt::Key_hyphen0x0ad 
Qt::Key_registered0x0ae 
Qt::Key_macron0x0af 
Qt::Key_degree0x0b0 
Qt::Key_plusminus0x0b1 
Qt::Key_twosuperior0x0b2 
Qt::Key_threesuperior0x0b3 
Qt::Key_acute0x0b4 
Qt::Key_mu0x0b5 
Qt::Key_paragraph0x0b6 
Qt::Key_periodcentered0x0b7 
Qt::Key_cedilla0x0b8 
Qt::Key_onesuperior0x0b9 
Qt::Key_masculine0x0ba 
Qt::Key_guillemotright0x0bb 
Qt::Key_onequarter0x0bc 
Qt::Key_onehalf0x0bd 
Qt::Key_threequarters0x0be 
Qt::Key_questiondown0x0bf 
Qt::Key_Agrave0x0c0 
Qt::Key_Aacute0x0c1 
Qt::Key_Acircumflex0x0c2 
Qt::Key_Atilde0x0c3 
Qt::Key_Adiaeresis0x0c4 
Qt::Key_Aring0x0c5 
Qt::Key_AE0x0c6 
Qt::Key_Ccedilla0x0c7 
Qt::Key_Egrave0x0c8 
Qt::Key_Eacute0x0c9 
Qt::Key_Ecircumflex0x0ca 
Qt::Key_Ediaeresis0x0cb 
Qt::Key_Igrave0x0cc 
Qt::Key_Iacute0x0cd 
Qt::Key_Icircumflex0x0ce 
Qt::Key_Idiaeresis0x0cf 
Qt::Key_ETH0x0d0 
Qt::Key_Ntilde0x0d1 
Qt::Key_Ograve0x0d2 
Qt::Key_Oacute0x0d3 
Qt::Key_Ocircumflex0x0d4 
Qt::Key_Otilde0x0d5 
Qt::Key_Odiaeresis0x0d6 
Qt::Key_multiply0x0d7 
Qt::Key_Ooblique0x0d8 
Qt::Key_Ugrave0x0d9 
Qt::Key_Uacute0x0da 
Qt::Key_Ucircumflex0x0db 
Qt::Key_Udiaeresis0x0dc 
Qt::Key_Yacute0x0dd 
Qt::Key_THORN0x0de 
Qt::Key_ssharp0x0df 
Qt::Key_division0x0f7 
Qt::Key_ydiaeresis0x0ff 
Qt::Key_Multi_key0x01001120 
Qt::Key_Codeinput0x01001137 
Qt::Key_SingleCandidate0x0100113c 
Qt::Key_MultipleCandidate0x0100113d 
Qt::Key_PreviousCandidate0x0100113e 
Qt::Key_Mode_switch0x0100117e 
Qt::Key_Kanji0x01001121 
Qt::Key_Muhenkan0x01001122 
Qt::Key_Henkan0x01001123 
Qt::Key_Romaji0x01001124 
Qt::Key_Hiragana0x01001125 
Qt::Key_Katakana0x01001126 
Qt::Key_Hiragana_Katakana0x01001127 
Qt::Key_Zenkaku0x01001128 
Qt::Key_Hankaku0x01001129 
Qt::Key_Zenkaku_Hankaku0x0100112a 
Qt::Key_Touroku0x0100112b 
Qt::Key_Massyo0x0100112c 
Qt::Key_Kana_Lock0x0100112d 
Qt::Key_Kana_Shift0x0100112e 
Qt::Key_Eisu_Shift0x0100112f 
Qt::Key_Eisu_toggle0x01001130 
Qt::Key_Hangul0x01001131 
Qt::Key_Hangul_Start0x01001132 
Qt::Key_Hangul_End0x01001133 
Qt::Key_Hangul_Hanja0x01001134 
Qt::Key_Hangul_Jamo0x01001135 
Qt::Key_Hangul_Romaja0x01001136 
Qt::Key_Hangul_Jeonja0x01001138 
Qt::Key_Hangul_Banja0x01001139 
Qt::Key_Hangul_PreHanja0x0100113a 
Qt::Key_Hangul_PostHanja0x0100113b 
Qt::Key_Hangul_Special0x0100113f 
Qt::Key_Dead_Grave0x01001250 
Qt::Key_Dead_Acute0x01001251 
Qt::Key_Dead_Circumflex0x01001252 
Qt::Key_Dead_Tilde0x01001253 
Qt::Key_Dead_Macron0x01001254 
Qt::Key_Dead_Breve0x01001255 
Qt::Key_Dead_Abovedot0x01001256 
Qt::Key_Dead_Diaeresis0x01001257 
Qt::Key_Dead_Abovering0x01001258 
Qt::Key_Dead_Doubleacute0x01001259 
Qt::Key_Dead_Caron0x0100125a 
Qt::Key_Dead_Cedilla0x0100125b 
Qt::Key_Dead_Ogonek0x0100125c 
Qt::Key_Dead_Iota0x0100125d 
Qt::Key_Dead_Voiced_Sound0x0100125e 
Qt::Key_Dead_Semivoiced_Sound0x0100125f 
Qt::Key_Dead_Belowdot0x01001260 
Qt::Key_Dead_Hook0x01001261 
Qt::Key_Dead_Horn0x01001262 
Qt::Key_Back0x01000061 
Qt::Key_Forward0x01000062 
Qt::Key_Stop0x01000063 
Qt::Key_Refresh0x01000064 
Qt::Key_VolumeDown0x01000070 
Qt::Key_VolumeMute0x01000071 
Qt::Key_VolumeUp0x01000072 
Qt::Key_BassBoost0x01000073 
Qt::Key_BassUp0x01000074 
Qt::Key_BassDown0x01000075 
Qt::Key_TrebleUp0x01000076 
Qt::Key_TrebleDown0x01000077 
Qt::Key_MediaPlay0x01000080 Sets the state of the media player to play
Qt::Key_MediaStop0x01000081 Sets the state of the media player to stop
Qt::Key_MediaPrevious0x01000082 
Qt::Key_MediaNext0x01000083 
Qt::Key_MediaRecord0x01000084 
Qt::Key_MediaPause0x1000085 Sets the state of the media player to paused
Qt::Key_MediaTogglePlayPause0x1000086 Toggles the play/pause state in the media player rather than setting an absolute state
Qt::Key_HomePage0x01000090 
Qt::Key_Favorites0x01000091 
Qt::Key_Search0x01000092 
Qt::Key_Standby0x01000093 
Qt::Key_OpenUrl0x01000094 
Qt::Key_LaunchMail0x010000a0 
Qt::Key_LaunchMedia0x010000a1 
Qt::Key_Launch00x010000a2 On X11 this key is mapped to "My Computer" (XF86XK_MyComputer) key for legacy reasons.
Qt::Key_Launch10x010000a3 On X11 this key is mapped to "Calculator" (XF86XK_Calculator) key for legacy reasons.
Qt::Key_Launch20x010000a4On X11 this key is mapped to XF86XK_Launch0 key for legacy reasons.
Qt::Key_Launch30x010000a5On X11 this key is mapped to XF86XK_Launch1 key for legacy reasons.
Qt::Key_Launch40x010000a6On X11 this key is mapped to XF86XK_Launch2 key for legacy reasons.
Qt::Key_Launch50x010000a7On X11 this key is mapped to XF86XK_Launch3 key for legacy reasons.
Qt::Key_Launch60x010000a8On X11 this key is mapped to XF86XK_Launch4 key for legacy reasons.
Qt::Key_Launch70x010000a9On X11 this key is mapped to XF86XK_Launch5 key for legacy reasons.
Qt::Key_Launch80x010000aaOn X11 this key is mapped to XF86XK_Launch6 key for legacy reasons.
Qt::Key_Launch90x010000abOn X11 this key is mapped to XF86XK_Launch7 key for legacy reasons.
Qt::Key_LaunchA0x010000acOn X11 this key is mapped to XF86XK_Launch8 key for legacy reasons.
Qt::Key_LaunchB0x010000adOn X11 this key is mapped to XF86XK_Launch9 key for legacy reasons.
Qt::Key_LaunchC0x010000aeOn X11 this key is mapped to XF86XK_LaunchA key for legacy reasons.
Qt::Key_LaunchD0x010000afOn X11 this key is mapped to XF86XK_LaunchB key for legacy reasons.
Qt::Key_LaunchE0x010000b0On X11 this key is mapped to XF86XK_LaunchC key for legacy reasons.
Qt::Key_LaunchF0x010000b1On X11 this key is mapped to XF86XK_LaunchD key for legacy reasons.
Qt::Key_LaunchG0x0100010eOn X11 this key is mapped to XF86XK_LaunchE key for legacy reasons.
Qt::Key_LaunchH0x0100010fOn X11 this key is mapped to XF86XK_LaunchF key for legacy reasons.
Qt::Key_MonBrightnessUp0x010000b2 
Qt::Key_MonBrightnessDown0x010000b3 
Qt::Key_KeyboardLightOnOff0x010000b4 
Qt::Key_KeyboardBrightnessUp0x010000b5 
Qt::Key_KeyboardBrightnessDown0x010000b6 
Qt::Key_PowerOff0x010000b7 
Qt::Key_WakeUp0x010000b8 
Qt::Key_Eject0x010000b9 
Qt::Key_ScreenSaver0x010000ba 
Qt::Key_WWW0x010000bb 
Qt::Key_Memo0x010000bc 
Qt::Key_LightBulb0x010000bd 
Qt::Key_Shop0x010000be 
Qt::Key_History0x010000bf 
Qt::Key_AddFavorite0x010000c0 
Qt::Key_HotLinks0x010000c1 
Qt::Key_BrightnessAdjust0x010000c2 
Qt::Key_Finance0x010000c3 
Qt::Key_Community0x010000c4 
Qt::Key_AudioRewind0x010000c5 
Qt::Key_BackForward0x010000c6 
Qt::Key_ApplicationLeft0x010000c7 
Qt::Key_ApplicationRight0x010000c8 
Qt::Key_Book0x010000c9 
Qt::Key_CD0x010000ca 
Qt::Key_Calculator0x010000cb On X11 this key is not mapped for legacy reasons. Qt::Key_Launch1 is preferred.
Qt::Key_ToDoList0x010000cc 
Qt::Key_ClearGrab0x010000cd 
Qt::Key_Close0x010000ce 
Qt::Key_Copy0x010000cf 
Qt::Key_Cut0x010000d0 
Qt::Key_Display0x010000d1 
Qt::Key_DOS0x010000d2 
Qt::Key_Documents0x010000d3 
Qt::Key_Excel0x010000d4 
Qt::Key_Explorer0x010000d5 
Qt::Key_Game0x010000d6 
Qt::Key_Go0x010000d7 
Qt::Key_iTouch0x010000d8 
Qt::Key_LogOff0x010000d9 
Qt::Key_Market0x010000da 
Qt::Key_Meeting0x010000db 
Qt::Key_MenuKB0x010000dc 
Qt::Key_MenuPB0x010000dd 
Qt::Key_MySites0x010000de 
Qt::Key_News0x010000df 
Qt::Key_OfficeHome0x010000e0 
Qt::Key_Option0x010000e1 
Qt::Key_Paste0x010000e2 
Qt::Key_Phone0x010000e3 
Qt::Key_Calendar0x010000e4 
Qt::Key_Reply0x010000e5 
Qt::Key_Reload0x010000e6 
Qt::Key_RotateWindows0x010000e7 
Qt::Key_RotationPB0x010000e8 
Qt::Key_RotationKB0x010000e9 
Qt::Key_Save0x010000ea 
Qt::Key_Send0x010000eb 
Qt::Key_Spell0x010000ec 
Qt::Key_SplitScreen0x010000ed 
Qt::Key_Support0x010000ee 
Qt::Key_TaskPane0x010000ef 
Qt::Key_Terminal0x010000f0 
Qt::Key_Tools0x010000f1 
Qt::Key_Travel0x010000f2 
Qt::Key_Video0x010000f3 
Qt::Key_Word0x010000f4 
Qt::Key_Xfer0x010000f5 
Qt::Key_ZoomIn0x010000f6 
Qt::Key_ZoomOut0x010000f7 
Qt::Key_Away0x010000f8 
Qt::Key_Messenger0x010000f9 
Qt::Key_WebCam0x010000fa 
Qt::Key_MailForward0x010000fb 
Qt::Key_Pictures0x010000fc 
Qt::Key_Music0x010000fd 
Qt::Key_Battery0x010000fe 
Qt::Key_Bluetooth0x010000ff 
Qt::Key_WLAN0x01000100 
Qt::Key_UWB0x01000101 
Qt::Key_AudioForward0x01000102 
Qt::Key_AudioRepeat0x01000103 
Qt::Key_AudioRandomPlay0x01000104 
Qt::Key_Subtitle0x01000105 
Qt::Key_AudioCycleTrack0x01000106 
Qt::Key_Time0x01000107 
Qt::Key_Hibernate0x01000108 
Qt::Key_View0x01000109 
Qt::Key_TopMenu0x0100010a 
Qt::Key_PowerDown0x0100010b 
Qt::Key_Suspend0x0100010c 
Qt::Key_ContrastAdjust0x0100010d 
Qt::Key_MediaLast0x0100ffff 
Qt::Key_Call0x01100004Used to answer or initiate a call
Qt::Key_Camera0x01100020Used to activate the camera shutter
Qt::Key_CameraFocus0x01100021Used to focus the camera
Qt::Key_Context10x01100000 
Qt::Key_Context20x01100001 
Qt::Key_Context30x01100002 
Qt::Key_Context40x01100003 
Qt::Key_Flip0x01100006 
Qt::Key_Hangup0x01100005End an ongoing call
Qt::Key_No0x01010002 
Qt::Key_Select0x01010000 
Qt::Key_Yes0x01010001 
Qt::Key_ToggleCallHangup0x01100007 Toggle the current call state, depends on current call state
Qt::Key_VoiceDial0x01100008 
Qt::Key_LastNumberRedial0x01100009 
Qt::Key_Execute0x01020003 
Qt::Key_Printer0x01020002 
Qt::Key_Play0x01020005 
Qt::Key_Sleep0x01020004 
Qt::Key_Zoom0x01020006 
Qt::Key_Cancel0x01020001 
Qt::Key_unknown0x01ffffffRepresents an invalid key
See also
QKeyEvent::key()
enum Qt::KeyboardModifier : uint32_t

This enum describes the modifier keys.

On Mac OS X the ControlModifier value corresponds to the Command keys on the Mac keyboard and the MetaModifier value corresponds to the Control keys. The KeypadModifier value will also be set when an arrow key is pressed as the arrow keys are considered part of the keypad.

On Windows, Qt::MetaModifier and Qt::Key_Meta are mapped to the Windows key.

ConstantValueDescription
Qt::NoModifier0x00000000 No modifier key was pressed.
Qt::ShiftModifier0x02000000 Shift key on the keyboard was pressed.
Qt::ControlModifier0x04000000 Ctrl key on the keyboard was pressed.
Qt::AltModifier0x08000000 Alt key on the keyboard was pressed.
Qt::MetaModifier0x10000000 Meta key on the keyboard was pressed.
Qt::KeypadModifier0x20000000 Keypad button was pressed.
Qt::GroupSwitchModifier0x40000000 X11 only, the Mode Switch key on the keyboard was pressed.
See also
Qt::MouseButton

Specifies the direction of layouts and text handling.

ConstantValueDescription
Qt::LeftToRight 0 Left-to-right layout.
Qt::RightToLeft 1 Right-to-left layout.
Qt::LayoutDirectionAuto 2 Automatic layout.

Right to left layouts are necessary for certain languages, notably Arabic and Hebrew. The LayoutDirectionAuto value can be used in two places.

  • When this value is passed to QApplication or QWidget the layout direction will respect whatever the parent window was set to. This has the same effect as QWidget::unsetLayoutDirection().
  • When this value is passed to QTextOption the directionality is determined from the content of the string.
See also
QApplication::setLayoutDirection(), QWidget::setLayoutDirection(), QTextOption::setTextDirection()

This enum specifies the behavior of the QPixmap::createMaskFromColor() and QImage::createMaskFromColor() functions.

ConstantValueDescription
Qt::MaskInColor0 Creates a mask where all pixels matching the given color are opaque.
Qt::MaskOutColor1 Creates a mask where all pixels matching the given color are transparent.

This enum describes the type of matches that can be used when searching for items in a model.

ConstantValueDescription
Qt::MatchExactly 0 Performs QVariant based matching.
Qt::MatchFixedString 8 Performs string-based matching. String-based comparisons are case-insensitive unless the MatchCaseSensitive flag is also specified.
Qt::MatchContains 1The search term is contained in the item.
Qt::MatchStartsWith 2 The search term matches the start of the item.
Qt::MatchEndsWith 3The search term matches the end of the item.
Qt::MatchCaseSensitive 16The search is case sensitive.
Qt::MatchRegExp4 Performs string-based matching using a regular expression as the search term.
Qt::MatchWildcard 5 Performs string-based matching using a string with wildcards as the search term.
Qt::MatchWrap 32 Perform a search that wraps around, so that when the search reaches the last item in the model, it begins again at the first item and continues until all items have been examined.
Qt::MatchRecursive 64 Searches the entire hierarchy.
See also
QString8::compare(), QRegularExpression

This enum type describes the different mouse buttons.

ConstantValueDescription
Qt::NoButton0x00000000 Button state does not refer to any button, refer to QMouseEvent::button().
Qt::LeftButton0x00000001 Left button is pressed or an event refers to the left button. Left button may be the right button on a left-handed mouse.
Qt::RightButton0x00000002 The right button.
Qt::MiddleButton0x00000004 Middle button.
Qt::XButton10x00000008 First X button.
Qt::XButton20x00000010 Second X button.
See also
Qt::KeyboardModifier

This enum provides additional information concerning a QMouseEvent.

ConstantValueDescription
Qt::MouseEventCreatedDoubleClick 0x01 Indicates CopperSpice has created a MouseButtonDblClick event from this event. The flag is set in the causing MouseButtonPress and not in the resulting MouseButtonDblClick.

This enum describes the source of a mouse event and can be useful to determine if the event is an artificial mouse event originating from another device such as a touchscreen.

ConstantValueDescription
Qt::MouseEventNotSynthesized 0 The most common value. On platforms where such information is available this value indicates that the event was generated in response to a genuine mouse event in the system.
Qt::MouseEventSynthesizedBySystem 1 Indicates that the mouse event was synthesized from a touch event by the platform.
Qt::MouseEventSynthesizedByCS 2 Indicates that the mouse event was synthesized from an unhandled touch event by CopperSpice.
Qt::MouseEventSynthesizedByApplication 3 Indicates that the mouse event was synthesized by the application. This allows distinguishing application-generated mouse events from the ones that are coming from the system or are synthesized by CopperSpice.

This enum returns the gesture type.

ConstantValueDescription
Qt::BeginNativeGesture 0 Sent before gesture event stream.
Qt::EndNativeGesture 1 Sent after gesture event stream.
Qt::PanNativeGesture 2 Sent after a panning gesture. Similar to a click-and-drag mouse movement.
Qt::ZoomNativeGesture 3 Specifies the magnification delta in percent.
Qt::SmartZoomNativeGesture 4 Boolean magnification state.
Qt::RotateNativeGesture 5 Rotation delta in degrees.
Qt::SwipeNativeGesture 6 Sent after a swipe movements.

This enum type describes the mode for moving focus.

ConstantValueDescription
Qt::NavigationModeNone0Only the touch screen is used.
Qt::NavigationModeKeypadTabOrder1Qt::Key_Up and Qt::Key_Down are used to change focus.
Qt::NavigationModeKeypadDirectional2 Qt::Key_Up, Qt::Key_Down, Qt::Key_Left and Qt::Key_Right are used to change focus.
Qt::NavigationModeCursorAuto3 The mouse cursor is used to change focus, it is displayed only on non touchscreen devices. The keypad is used to implement a virtual cursor, unless the device has an analog mouse type of input device (e.g. touchpad). This is the recommended setting for an application such as a web browser that needs pointer control on both touch and non-touch devices.
Qt::NavigationModeCursorForceVisible4 The mouse cursor is used to change focus, it is displayed regardless of device type. The keypad is used to implement a virtual cursor, unless the device has an analog mouse type of input device (e.g. touchpad)

This type is used to signify an object's orientation. As an example, this enum on is used with QScrollBar.

ConstantValue
Qt::Horizontal 0x1
Qt::Vertical 0x2

This enum defines the pen cap styles supported by QPainter.

ConstantValueDescription
Qt::FlatCap0x00 Square line end that does not cover the end point of the line
Qt::SquareCap0x10 Square line end that covers the end point and extends beyond it by half the line width
Qt::RoundCap0x20 Rounded line end
Qt::SquareCapQt::FlatCapQt::RoundCap
See also
QPen

This enum defines the pen join styles supported by QPainter.

ConstantValueDescription
Qt::MiterJoin0x00 The outer edges of the lines are extended to meet at an angle, and this area is filled.
Qt::BevelJoin0x40 The triangular notch between the two lines is filled.
Qt::RoundJoin0x80 A circular arc between the two lines is filled.
Qt::SvgMiterJoin0x100 A miter join corresponding to the definition of a miter join in the SVG 1.2 Tiny specification.
Qt::BevelJoin Qt::MiterJoinQt::RoundJoin
See also
QPen

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

ConstantValueDescription
Qt::NoPen0 no line at all. For example, QPainter::drawRect() fills but does notdraw any boundary line.
Qt::SolidLine1A plain line.
Qt::DashLine2Dashes separated by a few pixels.
Qt::DotLine3Dots separated by a few pixels.
Qt::DashDotLine4Alternate dots and dashes.
Qt::DashDotDotLine5One dash, two dots, one dash, two dots.
Qt::CustomDashLine6 A custom pattern defined using QPainterPathStroker::setDashPattern().
Qt::SolidLine Qt::DashLineQt::DotLine
Qt::DashDotLineQt::DashDotDotLineQt::CustomDashLine
See also
QPen

This enum type specifies the various orientations a screen might have.

ConstantValueDescription
Qt::PrimaryOrientation 0x00000000 The display's primary orientation
Qt::PortraitOrientation 0x00000001 Portrait orientation, display height is greater than display width, rotated 90 degree clockwise relative to landscape
Qt::LandscapeOrientation 0x00000002 Landscape orientation, display width is greater than display height
Qt::InvertedPortraitOrientation 0x00000004 Inverted portrait orientation, rotated 180 degrees relative to portrait
Qt::InvertedLandscapeOrientation 0x00000008 Inverted landscape orientation, rotated 180 degrees relative to landscape

This enum type describes the various modes of QAbstractScrollArea's scroll bars. The modes for the horizontal and vertical scroll bars are independent.

ConstantValueDescription
Qt::ScrollBarAsNeeded0 QAbstractScrollArea shows a scroll bar when the content is too large to fit and not otherwise. This is the default.
Qt::ScrollBarAlwaysOff1 QAbstractScrollArea never shows a scroll bar.
Qt::ScrollBarAlwaysOn2 QAbstractScrollArea always shows a scroll bar.

This enum describes the phase of scrolling.

ConstantValueDescription
Qt::NoScrollPhase 0 Input device does not support scroll phase
Qt::ScrollBegin 1 Scrolling is about to begin, but the scrolling distance did not yet change
Qt::ScrollUpdate 2 The scrolling distance has changed (default)
Qt::ScrollEnd 3 Scrolling has ended and the scrolling distance did not change anymore

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 shown below.

ConstantValueDescription
Qt::WidgetShortcut0 Shortcut is active when its parent widget has focus.
Qt::WindowShortcut1 Active when its parent widget is a logical subwidget of the active top-level window.
Qt::ApplicationShortcut2 Active when one of the applications windows are active.
Qt::WidgetWithChildrenShortcut3 Shortcut is active when its parent widget or any of its children has focus. Children which are top-level widgets, except pop-ups, are not affected by this shortcut context.

This enum is used by QGraphicsLayoutItem::sizeHint()

ConstantValueDescription
Qt::MinimumSize0 Specifies the minimum size of a graphics layout item.
Qt::PreferredSize1 Preferred size of a graphics layout item.
Qt::MaximumSize2 Maximum size of a graphics layout item.
Qt::MinimumDescent3 Specify the minimum descent of a text string in a graphics layout item.
See also
QGraphicsLayoutItem::sizeHint()

This enum is used by QPainter::drawRoundedRect() and QPainterPath::addRoundedRect() functions to specify the radii of rectangle corners with respect to the dimensions of the bounding rectangles specified.

ConstantValueDescription
Qt::AbsoluteSize0 Specifies the size using absolute measurements.
Qt::RelativeSize1 Specifies the size relative to the bounding rectangle, typically using percentage measurements.

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

ConstantValueDescription
Qt::AscendingOrder0 The items are sorted ascending e.g. starts with 'AAA' ends with 'ZZZ' in Latin-1 locales
Qt::DescendingOrder1 The items are sorted descending e.g. starts with 'ZZZ' ends with 'AAA' in Latin-1 locales

This enum type provides different focus behaviors for tab navigation.

ConstantValueDescription
Qt::NoTabFocus 0x00 Iterate over nothing
Qt::TabFocusTextControls 0x01 Iterate text controls and widgets
Qt::TabFocusListControls 0x02 Iterate list controls and widgets
Qt::TabFocusAllControls 0xff Iterate all controls and widgets

This enum specifies where the ellipsis should appear when displaying texts does not fit. Qt::ElideMiddle is normally the most appropriate choice for URLs whereas Qt::ElideRight is appropriate for other strings.

ConstantValueDescription
Qt::ElideLeft0 Ellipsis should appear at the beginning of the text.
Qt::ElideRight1 Ellipsis should appear at the end of the text.
Qt::ElideMiddle2 Ellipsis should appear in the middle of the text.
Qt::ElideNone3 Ellipsis should NOT appear in the text.
See also
QAbstractItemView::textElideMode, QFontMetrics::elidedText(), Qt::AlignmentFlag, QTabBar::elideMode

This enum type is used to define some modifier flags. Some of these flags only make sense in the context of printing. You can use as many modifier flags as required. The values for Qt::TextSingleLine and Qt::TextWordWrap can not be combined. Flags that are inappropriate for a given use are generally ignored.

ConstantValueDescription
Qt::TextSingleLine0x0100 Treats all whitespace as spaces and prints just one line.
Qt::TextDontClip0x0200If it is impossible to stay within the given bounds, it prints outside.
Qt::TextExpandTabs0x0400Makes the U+0009 (ASCII tab) character move to the next tab stop.
Qt::TextShowMnemonic0x0800Displays the string "&P" as P (see QButton for an example). For an ampersand, use "&&".
Qt::TextWordWrap0x1000Breaks lines at appropriate points, e.g. at word boundaries.
Qt::TextWrapAnywhere0x2000Breaks lines anywhere, even within words.
Qt::TextHideMnemonic0x8000Same as Qt::TextShowMnemonic but does not draw the underlines.
Qt::TextDontPrint0x4000Treat this text as "hidden" and do not print it.
Qt::IncludeTrailingSpaces ? When this option is set, QTextLine::naturalTextWidth() and naturalTextRect() will return a value that includes the width of trailing spaces in the text; otherwise this width is excluded.
Qt::TextIncludeTrailingSpaces0x08000000Same as IncludeTrailingSpaces
Qt::TextJustificationForced0x10000Ensures that text lines are justified.

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 setTextFormat().

ConstantValueDescription
Qt::PlainText0 Text string is interpreted as a plain text string.
Qt::RichText1 Text string is interpreted as a rich text string.
Qt::AutoText2 Text string is interpreted as for Qt::RichText if Qt::mightBeRichText() returns true, otherwise as Qt::PlainText.

This enum specifies how a text displaying widget reacts to user input.

ConstantValueDescription
Qt::NoTextInteraction0 No interaction with the text is possible
Qt::TextSelectableByMouse1 Text can be selected with the mouse and copied to the clipboard using a context menu or standard keyboard shortcuts
Qt::TextSelectableByKeyboard2 Text can be selected with the cursor keys on the keyboard, a text cursor is shown
Qt::LinksAccessibleByMouse4 Links can be highlighted and activated with the mouse
Qt::LinksAccessibleByKeyboard8 Links can be focused using tab and activated with enter
Qt::TextEditable16 The text is fully editable
Qt::TextEditorInteraction TextSelectableByMouse |
TextSelectableByKeyboard |
TextEditable
The default for a text editor.
Qt::TextBrowserInteraction TextSelectableByMouse |
LinksAccessibleByMouse |
LinksAccessibleByKeyboard
The default for QTextBrowser

This enum describes how to repeat or stretch the parts of an image when drawing.

ConstantValueDescription
Qt::StretchTile0 Scale the image to fit to the available area.
Qt::RepeatTile1 Repeat the image until there is no more space. May crop the last image.
Qt::RoundTile2 Similar to Repeat, but scales the image down to ensure that the last tile is not cropped.

The timer type indicates how accurate a timer can be.

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

On Windows the Multimedia timer will be used (if available) for Qt::PreciseTimer and normal Windows timers for Qt::CoarseTimer and Qt::VeryCoarseTimer.

On all platforms the interval for Qt::VeryCoarseTimer is rounded to the nearest full second (e.g. an interval of 23500ms will be rounded to 24000ms, and 20300ms to 20000ms).

ConstantValueDescription
Qt::PreciseTimer 0 Precise timers try to keep millisecond accuracy
Qt::CoarseTimer 1 Coarse timers try to keep accuracy within 5% of the desired interval
Qt::VeryCoarseTimer 2 Very coarse timers only keep full second accuracy

The enum describes the time zone which applies to a particular time.

ConstantValueDescription
Qt::LocalTime0 Locale dependent time (Timezones and Daylight Savings Time)
Qt::UTC1 Coordinated Universal Time, replaces Greenwich Mean Time
Qt::OffsetFromUTC2 An offset in seconds from Coordinated Universal Time
Qt::TimeZone3 A named time zone using a specific set of Daylight Savings rules

This enum describes various locations where a toolbar can be placed.

ConstantValue
Qt::LeftToolBarArea0x1
Qt::RightToolBarArea0x2
Qt::TopToolBarArea0x4
Qt::BottomToolBarArea0x8
Qt::AllToolBarAreasToolBarArea_Mask
Qt::NoToolBarArea0

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

ConstantValueDescription
Qt::ToolButtonIconOnly0Only display the icon.
Qt::ToolButtonTextOnly1Only display the text.
Qt::ToolButtonTextBesideIcon2The text appears beside the icon.
Qt::ToolButtonTextUnderIcon3The text appears under the icon.
Qt::ToolButtonFollowStyle4Follow the style.

This enum represents the state of a touch point at the time the QTouchEvent occurred.

ConstantValueDescription
Qt::TouchPointPressed0x01The touch point is now pressed.
Qt::TouchPointMoved0x02The touch point moved.
Qt::TouchPointStationary0x04The touch point did not move.
Qt::TouchPointReleased0x08The touch point was released.

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

ConstantValueDescription
Qt::FastTransformation0The transformation is performed quickly, with no smoothing.
Qt::SmoothTransformation1The resulting image is transformed using bilinear filtering.
See also
QImage::scaled()

This enum describes the available UI effects.

CopperSpice will try to use the platform specific desktop settings for each effect. Use the QApplication::setDesktopSettingsAware() function (passing false as argument) to prevent this, and the QApplication::setEffectEnabled() to enable or disable a particular effect.

All effects are disabled on screens running at less than 16-bit color depth.

ConstantValueDescription
Qt::UI_AnimateMenu1Show animated menus.
Qt::UI_FadeMenu2Show faded menus.
Qt::UI_AnimateCombo3Show animated comboboxes.
Qt::UI_AnimateTooltip4Show tooltip animations.
Qt::UI_FadeTooltip5Show tooltip fading effects.
Qt::UI_AnimateToolBox6Reserved
See also
QApplication::setEffectEnabled(), QApplication::setDesktopSettingsAware()

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. Values for this enum are defined in the QTextDocument header file.

ConstantValueDescription
Qt::WhiteSpaceNormal0 Whitespace mode used to display normal word wrapped text in paragraphs.
Qt::WhiteSpacePre1 Preformatted text mode in which whitespace is reproduced exactly.
Qt::WhiteSpaceNoWrap2  

This enum type is used to specify a variety of widget attributes. Attributes are set and cleared by calling QWidget::setAttribute() and queried using QWidget::testAttribute().

ConstantValueDescription
Qt::WA_AcceptDrops78 Allows drag and drop onto the widget, refer to QWidget::setAcceptDrops().
Qt::WA_AlwaysShowToolTips84 Enables tooltips for inactive windows.
Qt::WA_CustomWhatsThis47 Indicates the widget should continue operating normally in "What's This?" mode.
Qt::WA_DeleteOnClose55 Deletes this widget when it has accepts the close event, refer to QWidget::closeEvent().
Qt::WA_Disabled0 Indicates the widget is disabled and will not receive any mouse or keyboard events.
Qt::WA_DontShowOnScreen103 Indicates the widget is hidden or is not a part of the viewable Desktop.
Qt::WA_ForceDisabled32 Indicates the widget will remain disabled even if any parent widgets are enabled. This implies WA_Disabled. T Set by calling QWidget::setEnabled() and unset by calling QWidget::setDisabled().
Qt::WA_ForceUpdatesDisabled59 Indicates updates will remain disabled even if any parent widgets are set to the updates/enabled state. This implies WA_UpdatesDisabled. Set or cleared by calling by QWidget::setUpdatesEnabled().
Qt::WA_GroupLeader72 Deprecated, use QWidget::windowModality instead.
Qt::WA_Hover74 Generates paint events when the mouse enters or leaves the widget. This feature is typically used when implementing custom styles.
Qt::WA_InputMethodEnabled14 Enables input methods for Asian languages. Must be set when creating custom text editing widgets.
Qt::WA_KeyboardFocusChange77 Set on a toplevel window when the user changes focus with the keyboard.
Qt::WA_KeyCompression33

Enables key event compression if set. By default key compression is disabled so widgets receive one key press event for each key press. When compression is enabled and your program does not keep up with key input, CopperSpice may try to compress key events so more than one character can be processed in each event.

If a widget supports multiple character unicode input it is safe to turn compression on. CopperSpice 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.

Only MAC OS X and X11 support this compression, turning it on will have no effect on Windows.

Qt::WA_LayoutOnEntireRect48 Indicates the widget wants QLayout to operate on the entire QWidget::rect(), not only on QWidget::contentsRect().
Qt::WA_LayoutUsesWidgetRect92 Ignore the layout item rect from the style when laying out this widget with QLayout. This makes a difference in QMacStyle for some widgets.
Qt::WA_MacNoClickThrough12 When a widget has this attribute set and the window is inactive, a mouse click will make the window active but will not be delivered to the widget. Typical use of this attribute is on widgets with irreversible actions like a "Delete" button. The setting also applies to all child widgets of the current widget.
Qt::WA_MacOpaqueSizeGrip85 Indicates the native Carbon size grip should be opaque instead of transparent. Only has an effect on Mac OS X.
Qt::WA_MacShowFocusRect88 Indicates this widget should have a QFocusFrame drawn around it. Some widgets will draw their own focus frame regardless of this attribute. The QWidget::focusPolicy determines if a widget can have focus or not. Only has an effect on Mac OS X.
Qt::WA_MacNormalSize89 Indicates the widget should have the normal size for widgets. Only has an effect on Mac OS X.
Qt::WA_MacSmallSize90 Indicates the widget should have the small size for widgets. Only has an effect on Mac OS X.
Qt::WA_MacMiniSize91 Indicates the widget should have the mini size for widgets. Only has an effect on Mac OS X.
Qt::WA_MacVariableSize102 Indicates the widget can choose between alternative sizes for widgets to avoid clipping. Only has an effect on Mac OS X.
Qt::WA_MacBrushedMetal46 Indicates the widget should be drawn in the brushed metal style. Only has an effect on Mac OS X.
Qt::WA_Mapped11 Indicates the widget is mapped on screen./td>
Qt::WA_MouseNoMask71 Allow the widget to receive mouse events for the entire widget regardless of the currently set mask, overriding QWidget::setMask(). Has no effect for top-level windows.
Qt::WA_MouseTracking2 Indicates that the widget has mouse tracking enabled, refer to QWidget::mouseTracking.
Qt::WA_Moved43Indicates that the widget has an explicit position. This is set and cleared by calling QWidget::move() or QWidget::setGeometry().
Qt::WA_MSWindowsUseDirect3D94 Obsolete, has no effect.
Qt::WA_NoChildEventsForParent58 Indicates the widget does not want ChildAdded or ChildRemoved events sent to its parent widget. This is rarely necessary but can help to avoid automatic insertion widgets like splitters and layouts.
Qt::WA_NoChildEventsFromChildren39 Indicates the widget does not want to receive ChildAdded or ChildRemoved events sent from its children.
Qt::WA_NoMouseReplay54 Used for pop-up widgets. Indicates the most recent mouse press event should not be replayed when the pop-up widget closes. The flag is automatically cleared every time the widget receives a new mouse event.
Qt::WA_NoMousePropagation73 Prohibits mouse events from being propagated to the parent widget, disabled by default.
Qt::WA_TransparentForMouseEvents51 When enabled this attribute blocks the delivery of mouse events to the widget and any child widgets. Mouse events are delivered to other widgets as if the current widget and its children did not exist. This attribute is disabled by default.
Qt::WA_NoSystemBackground9 Indicates the widget has no background. When the widget receives paint events the background is not automatically repainted. Unlike WA_OpaquePaintEvent, exposed areas are never filled with the background.
Qt::WA_OpaquePaintEvent4 Indicates the widget paints all pixels when it receives a paint event. It is not required for operations like updating, resizing, scrolling and focus changes to erase the widget before generating paint events. The use of WA_OpaquePaintEvent provides a small optimization. Unlike WA_NoSystemBackground, WA_OpaquePaintEvent makes an effort to avoid transparent window backgrounds.
Qt::WA_OutsideWSRange49 Indicates the widget is outside the valid range of the window system's coordinate system. A widget outside the valid range can not be mapped on screen.
Qt::WA_PaintOnScreen8 Indicates the widget wants to draw directly on the screen. Widgets with this attribute set, do not participate in composition. These widgets can not be semi-transparent or show through semi-transparent overlapping widgets. This flag is only supported on X11 and it disables double buffering. To render outside of the CopperSpice paint system reimplement QWidget::paintEngine() to return a nullptr and set this flag.
Qt::WA_PaintOutsidePaintEvent13 Makes it possible to use QPainter to paint on the widget outside paintEvent(). Not supported on Windows or Mac OS X.
Qt::WA_PaintUnclipped52 Disables clipping when painting this widget. Children of this widget or other widgets in front of it do not clip the area the painter can paint on. This flag is only supported for widgets with the WA_PaintOnScreen flag set. The preferred way to do this in a cross platform way is to create a transparent widget that lies in front of the other widgets.
Qt::WA_PendingMoveEvent34 Indicates a move event is pending, for example when a hidden widget is moved.
Qt::WA_PendingResizeEvent35 Indicates a resize event is pending, for example when a hidden widget is sresized.
Qt::WA_QuitOnClose76 The application will quit when the last widget with this attribute set has accepted a closeEvent. This behavior can be modified with the QApplication::quitOnLastWindowClosed property. By default this attribute is set for all widgets of type Qt::Window.
Qt::WA_Resized42 Indicates the widget has an explicit size. This flag is set or cleared by QWidget::resize() and QWidget::setGeometry().
Qt::WA_RightToLeft56 Indicates the layout direction for the widget is right to left.
Qt::WA_SetCursor38 Indicates the widget has a cursor of its own. This flag is set or cleared by QWidget::setCursor() and QWidget::unsetCursor().
Qt::WA_SetFont37 Indicates the widget has a font of its own. This flag is set or cleared by QWidget::setFont().
Qt::WA_SetPalette36 Indicates the widget has a palette of its own. This flag isset or cleared by QWidget::setPalette().
Qt::WA_SetStyle86 Indicates the widget has a style of its own. This flag is set or cleared by QWidget::setStyle().
Qt::WA_ShowModal70 Deprecated, use QWidget::windowModality instead.
Qt::WA_StaticContents5 Indicates the widget contents are north-west aligned and static. On resize this widget will receive paint events only for areas which become visible.
Qt::WA_StyleSheet97 Indicates the widget is styled using a style sheet.
Qt::WA_TranslucentBackground120 Indicates the widget should have a translucent background. Any non-opaque regions of the widgets will be translucent because the widget will have an alpha channel. Setting this flag causes WA_NoSystemBackground to be set. On Windows the widget also needs the Qt::FramelessWindowHint window flag to be set.
Qt::WA_UnderMouse1 Indicates the widget is under the mouse cursor. The value is not updated correctly during drag and drop operations.
Qt::WA_UpdatesDisabled10 Indicates updates are blocked, including the system background.


ConstantValueDescription
Qt::WA_WindowModified41Indicates that the window is marked as modified. On some platforms this flag will do nothing, on others (including Mac OS X and Windows) the window will take a modified appearance. This flag is set or cleared by QWidget::setWindowModified().
Qt::WA_WindowPropagation80Makes a toplevel window inherit font and palette from its parent.
Qt::WA_MacAlwaysShowToolWindow96On Mac OS X, show the tool window even when the application is not active. By default, all tool windows are hidden when the application is inactive.
Qt::WA_SetLocale87Indicates the locale should be taken into consideration in the widget.
Qt::WA_StyledBackground93Indicates the widget should be drawn using a styled background.
Qt::WA_ShowWithoutActivating98Show the widget without making it active.
Qt::WA_NativeWindow100Indicates that a native window is created for the widget. Enabling this flag will also force a native window for the widget's ancestors unless Qt::WA_DontCreateNativeAncestors is set.
Qt::WA_DontCreateNativeAncestors101Indicates that the widget's ancestors are kept non-native even though the widget itself is native.
Qt::WA_X11NetWmWindowTypeDesktop104Adds _NET_WM_WINDOW_TYPE_DESKTOP to the window's _NET_WM_WINDOW_TYPE X11 window property. Refer to http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms.
Qt::WA_X11NetWmWindowTypeDock105Adds _NET_WM_WINDOW_TYPE_DOCK to the window's _NET_WM_WINDOW_TYPE X11 window property. Refer to http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms.
Qt::WA_X11NetWmWindowTypeToolBar106Adds _NET_WM_WINDOW_TYPE_TOOLBAR to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Automatically set for QToolBar.
Qt::WA_X11NetWmWindowTypeMenu107Adds _NET_WM_WINDOW_TYPE_MENU to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Automatically set for QMenu when torn-off.
Qt::WA_X11NetWmWindowTypeUtility108Adds _NET_WM_WINDOW_TYPE_UTILITY to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Automatically set for Qt::Tool window type.
Qt::WA_X11NetWmWindowTypeSplash109Adds _NET_WM_WINDOW_TYPE_SPLASH to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Automatically set for the Qt::SplashScreen window type.
Qt::WA_X11NetWmWindowTypeDialog110Adds _NET_WM_WINDOW_TYPE_DIALOG to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Automatically set for the Qt::Dialog and Qt::Sheet window types.
Qt::WA_X11NetWmWindowTypeDropDownMenu111Adds _NET_WM_WINDOW_TYPE_DROPDOWN_MENU to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Automatically set for QMenus added to a QMenuBar.
Qt::WA_X11NetWmWindowTypePopupMenu112Adds _NET_WM_WINDOW_TYPE_POPUP_MENU to the window's _NET_WM_WINDOW_TYPE X11 window property. Refer to http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Automatically set for QMenu.
Qt::WA_X11NetWmWindowTypeToolTip113Adds _NET_WM_WINDOW_TYPE_TOOLTIP to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Automatically set for Qt::ToolTip window type.
Qt::WA_X11NetWmWindowTypeNotification114Adds _NET_WM_WINDOW_TYPE_NOTIFICATION to the window's _NET_WM_WINDOW_TYPE X11 window property. Refer to http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms.
Qt::WA_X11NetWmWindowTypeCombo115Adds _NET_WM_WINDOW_TYPE_COMBO to the window's _NET_WM_WINDOW_TYPE X11 window property. Refert to http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Automatically set for the QComboBox pop-up.
Qt::WA_X11NetWmWindowTypeDND116Adds _NET_WM_WINDOW_TYPE_DND to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Automatically set for the feedback widget used during a drag.
Qt::WA_MacFrameworkScaled117Enables resolution independence aware mode on Mac when using Carbon. This attribute has no effect on Cocoa. The attribute is off by default and can be enabled on a per-window basis.
Qt::WA_AcceptTouchEvents121Allows touch events (see QTouchEvent) to be sent to the widget. Must be set on all widgets that can handle touch events. Without this attribute set, events from a touch device will be sent as mouse events.
Qt::WA_TouchPadAcceptSingleTouchEvents123Allows touchpad single touch events to be sent to the widget.
Qt::WA_MergeSoftkeys124Allows widget to merge softkeys with parent widget, i.e. widget can set only one softkeys and request softkey implementation to take rest of the softkeys from the parent. Note parents are traversed until WA_MergeSoftkeys is not set. Refer to Qt::WA_MergeSoftkeysRecursively.
Qt::WA_MergeSoftkeysRecursively125Allows widget to merge softkeys recursively with all parents. If this attribute is set, the widget parents are traversed until window boundary (widget without parent or dialog) is found.
Qt::WA_X11DoNotAcceptFocus132Asks the window manager to not give focus to this top level window. This attribute has no effect on non-X11 platforms.
Qt::WA_LockPortraitOrientation128Locks the widget to a portrait orientation, ignoring changes to the display's orientation with respect to the user.
Qt::WA_LockLandscapeOrientation129Locks the widget to a landscape orientation, ignoring changes to the display's orientation with respect to the user.
Qt::WA_AutoOrientation130Causes the widget to change orientation whenever the display changes orientation with respect to the user.
Qt::WA_MacNoShadow134This attribute disables drop shadows for this top level window. Only affects Cocoa builds of CopperSpice for OS X.

This enum is used to describe parts of a window frame. It is returned by QGraphicsWidget::windowFrameSectionAt() to describe what section of the window frame is under the mouse.

ConstantValue
Qt::NoSection0
Qt::LeftSection1
Qt::TopLeftSection2
Qt::TopSection3
Qt::TopRightSection4
Qt::RightSection5
Qt::BottomRightSection6
Qt::BottomSection7
Qt::BottomLeftSection8
Qt::TitleBarArea9
See also
QGraphicsWidget::windowFrameEvent(), QGraphicsWidget::paintWindowFrame(), QGraphicsWidget::windowFrameSectionAt()

This enum specifies the behavior of a modal window. A modal window is one that blocks input to other windows. Windows which are children of a modal window are not blocked.

The values are:

ConstantValueDescription
Qt::NonModal 0 The window is not modal and does not block input to other windows.
Qt::WindowModal 1 The window is modal to a single window hierarchy and blocks input to its parent window, all grandparent windows, and all siblings of its parent and grandparent windows.
Qt::ApplicationModal 2 The window is modal to the application and blocks input to all windows.
See also
QWidget::windowModality, QDialog

This enum type is used to specify the current state of a top-level window. The states are as follows.

ConstantValueDescription
Qt::WindowNoState0x00000000 Has no state set (in normal state).
Qt::WindowMinimized0x00000001 Minimized (i.e. iconified).
Qt::WindowMaximized0x00000002 Maximized with a frame around it.
Qt::WindowFullScreen0x00000004 Window fills the entire screen without any frame around it.
Qt::WindowActive0x00000008 Window is the active window, t has keyboard focus.

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 shown below.

ConstantValueDescription
Qt::Widget0x00000000Default type for QWidget. Widgets of this type are child widgets if they have a parent and independent windows if they have no parent. Refer to Qt::Window and Qt::SubWindow.
Qt::Window0x00000001Indicates the widget is a window, usually with a window system frame and a title bar, irrespective of whether the widget has a parent or not. It is not possible to unset this flag if the widget does not have a parent.
Qt::Dialog0x00000002 | WindowIndicates the widget is a window which should be decorated as a dialog where typically no maximize or minimize buttons appear in the title bar. This is the default type for QDialog. To use as a modal dialog it should be launched from another window or have a parent and be used with the QWidget::windowModality property. If you make it modal, the dialog will prevent other top-level windows in the application from getting any input. We refer to a top-level window that has a parent as a secondary window.
Qt::Sheet0x00000004 | WindowIndicates the window is a Macintosh sheet. Since using a sheet implies window modality, the recommended way is to use QWidget::setWindowModality() or QDialog::open(), instead.
Qt::Drawer0x00000006 | WindowIndicates the widget is a Macintosh drawer.
Qt::Popup0x00000008 | WindowIndicates the widget is a pop-up top-level window, i.e. that it is modal, but has a window system frame appropriate for pop-up menus.
Qt::Tool0x0000000a | WindowIndicates the widget is a tool window. A tool window is often a small window with a smaller than usual title bar and decoration, typically used for collections of tool buttons. If there is a parent the tool window will always be kept on top. If there is not a parent, consider using Qt::WindowStaysOnTopHint. If the window system supports it a tool window can be decorated with a somewhat lighter frame and can be combined with Qt::FramelessWindowHint. On Mac OS X, tool windows correspond to the Floating class of windows. This means the window lives a level above normal windows and you can not put a normal window on top of it. By default tool windows will disappear when the application is inactive. This can be controlled by the Qt::WA_MacAlwaysShowToolWindow attribute.
Qt::ToolTip0x0000000c | Window Indicates the widget is a tooltip, used internally to implement tooltips.
Qt::SplashScreen 0x0000000e | WindowIndicates the window is a splash screen, default type for QSplashScreen.
Qt::Desktop0x00000010 | Window Indicates this widget is the desktop, the type for QDesktopWidget.
Qt::SubWindow0x00000012 Indicates this widget is a sub-window, such as a QMdiSubWindow widget.


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:

ConstantValueDescription
Qt::MSWindowsFixedSizeDialogHint 0x00000100Gives the window a thin dialog border on Windows. This style is traditionally used for fixed-size dialogs.
Qt::MSWindowsOwnDC0x00000200Gives the window its own display context on Windows.
Qt::X11BypassWindowManagerHint0x00000400 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::FramelessWindowHint0x00000800 Produces a borderless window. The user can not 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.

The CustomizeWindowHint flag is used to enable customization of the window controls. This flag must be set to allow the WindowTitleHint, WindowSystemMenuHint, WindowMinimizeButtonHint, WindowMaximizeButtonHint and WindowCloseButtonHint flags to be changed.

ConstantValueDescription
Qt::CustomizeWindowHint0x02000000Turns off the default window title hints.
Qt::WindowTitleHint0x00001000Gives the window a title bar.
Qt::WindowSystemMenuHint0x00002000Adds a window system menu, and possibly a close button (for example on Mac). If you need to hide or show a close button, it is more portable to use WindowCloseButtonHint.
Qt::WindowMinimizeButtonHint 0x00004000 Adds a minimize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
Qt::WindowMaximizeButtonHint0x00008000Adds 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::WindowCloseButtonHint0x08000000Adds a close button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
Qt::WindowContextHelpButtonHint0x00010000Adds a context help button to dialogs. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
Qt::MacWindowToolBarButtonHint0x10000000On Mac OS X, adds the oblong button which is on the top right of windows which have toolbars.
Qt::BypassGraphicsProxyWidget0x20000000Prevents the window and its children from automatically embedding themselves into a QGraphicsProxyWidget if the parent widget is already embedded. You can set this flag if you want your widget to always be a toplevel widget on the desktop, regardless of whether the parent widget is embedded in a scene or not.
Qt::WindowShadeButtonHint0x00020000 
Qt::WindowStaysOnTopHint0x00040000Informs the window system that the window should stay on top of all other windows. On some window managers for X11 you also have to pass Qt::X11BypassWindowManagerHint for this flag to work correctly.
Qt::WindowStaysOnBottomHint0x04000000Informs the window system that the window should stay on bottom of all other windows. On X11 this hint will work only in window managers that support _NET_WM_STATE_BELOW atom. If a window always on the bottom has a parent, the parent will also be left on the bottom. This window hint is currently not implemented for Mac OS X.
Qt::WindowType_Mask0x000000ffA mask for extracting the window type part of the window flags.

The following are obsolete flags.

ConstantValueDescription
Qt::WMouseNoMask?Use Qt::WA_MouseNoMask instead.
Qt::WDestructiveClose?Use Qt::WA_DeleteOnClose instead.
Qt::WStaticContents?Use Qt::WA_StaticContents instead.
Qt::WGroupLeader?No longer needed.
Qt::WShowModal?Use QWidget::windowModality instead.
Qt::WNoMousePropagation?Use Qt::WA_NoMousePropagation instead.
Qt::WType_TopLevel?Use Qt::Window instead.
Qt::WType_Dialog?Use Qt::Dialog instead.
Qt::WType_Popup?Use Qt::Popup instead.
Qt::WType_Desktop?Use Qt::Desktop instead.
Qt::WType_Mask?Use Qt::WindowType_Mask instead.
Qt::WStyle_Customize?No longer needed.
Qt::WStyle_NormalBorder?No longer needed.
Qt::WStyle_DialogBorder?Use Qt::MSWindowsFixedSizeDialogHint instead.
Qt::WStyle_NoBorder?Use Qt::FramelessWindowHint instead.
Qt::WStyle_Title?Use Qt::WindowTitleHint instead.
Qt::WStyle_SysMenu?Use Qt::WindowSystemMenuHint instead.
Qt::WStyle_Minimize?Use Qt::WindowMinimizeButtonHint instead.
Qt::WStyle_Maximize?Use Qt::WindowMaximizeButtonHint instead.
Qt::WStyle_MinMax?Use Qt::WindowMinMaxButtonsHint instead.
Qt::WStyle_Tool?Use Qt::Tool instead.
Qt::WStyle_StaysOnTop?Use Qt::WindowStaysOnTopHint instead.
Qt::WStyle_ContextHelp?Use Qt::WindowContextHelpButtonHint instead.
Qt::WPaintDesktop?No longer needed.
Qt::WPaintClever?No longer needed.
Qt::WX11BypassWM?Use Qt::X11BypassWindowManagerHint instead.
Qt::WWinOwnDC?Use Qt::MSWindowsOwnDC instead.
Qt::WMacSheet?Use Qt::Sheet instead.
Qt::WMacDrawer?Use Qt::Drawer instead.
Qt::WStyle_Splash?Use Qt::SplashScreen instead.
Qt::WNoAutoErase?No longer needed.
Qt::WRepaintNoErase?No longer needed.
Qt::WNorthWestGravity?Use Qt::WA_StaticContents instead.
Qt::WType_Modal?Use Qt::Dialog and QWidget::windowModality instead.
Qt::WStyle_Dialog?Use Qt::Dialog instead.
Qt::WStyle_NoBorderEx?Use Qt::FramelessWindowHint instead.
Qt::WResizeNoErase?No longer needed.
Qt::WMacNoSheet?No longer needed.
See also
QWidget::windowFlags()

Method Documentation

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

Converts the plain text string plain to an HTML formatted paragraph while preserving most of its look. The value for mode defines how whitespace is handled.

This method is defined in the QTextDocument header file.

See also
QString8::toHtmlEscaped(), mightBeRichText()
bool Qt::mightBeRichText ( const QString text)
static

Returns true if the string text is likely to be rich text, otherwise returns false. This method 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.

This method is defined in the QTextDocument header file.