Qt Namespace
The Qt namespace contains miscellaneous identifiers used throughout Nt. More…
| Header | #include <Qt> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
Public Types
Public Functions
Public Variables
| namespace | Literals |
Detailed Description
It holds the enums shared by several classes, such as Qt::CaseSensitivity and Qt::TimeSpec.
Differences from Qt
Only the enums listed here exist. Qt's other Qt:: enums, such as the window flags, cursor shapes and item-view roles, are not provided. The enums that Nt GUI uses (keys, mouse buttons, modifiers, colors, pen and brush styles and alignment) hold a subset of Qt's values, with the same numbers.
Member Type Documentation
typedef Qt::Alignment
The Alignment type is a typedef for QFlags<AlignmentFlag>. It stores an OR combination of AlignmentFlag values.
enum Qt::AlignmentFlag
This enum describes how text and items are aligned. The Alignment type is a typedef for QFlags<AlignmentFlag>.
| Constant | Description |
|---|---|
Qt::AlignLeft | Aligns with the left edge. |
Qt::AlignRight | Aligns with the right edge. |
Qt::AlignHCenter | Centers horizontally. |
Qt::AlignTop | Aligns with the top. |
Qt::AlignBottom | Aligns with the bottom. |
Qt::AlignVCenter | Centers vertically. |
Qt::AlignCenter | Centers both ways: AlignHCenter | AlignVCenter. |
enum Qt::ArrowType
This enum says which way the arrow of a tool button points.
| Constant | Description |
|---|---|
Qt::NoArrow | No arrow. |
Qt::UpArrow | An arrow that points up. |
Qt::DownArrow | An arrow that points down. |
Qt::LeftArrow | An arrow that points to the left. |
Qt::RightArrow | An arrow that points to the right. |
enum Qt::AspectRatioMode
This enum describes how to scale a rectangle or size to fit another.
| Constant | Description |
|---|---|
Qt::IgnoreAspectRatio | The size is scaled freely; the aspect ratio is not preserved. |
Qt::KeepAspectRatio | The size is scaled to the largest rectangle that fits inside the given size, preserving the aspect ratio. |
Qt::KeepAspectRatioByExpanding | The size is scaled to the smallest rectangle that contains the given size, preserving the aspect ratio. |
See also QSize::scaled().
enum Qt::Axis
This enum names the axes of a rotation.
| Constant | Description |
|---|---|
Qt::XAxis | The x axis. |
Qt::YAxis | The y axis. |
Qt::ZAxis | The z axis, out of the screen: rotations in the plane. |
enum Qt::BrushStyle
This enum describes how QPainter fills shapes.
| Constant | Description |
|---|---|
Qt::NoBrush | No fill. |
Qt::SolidPattern | A uniform fill. |
Qt::LinearGradientPattern | A QLinearGradient. |
Qt::RadialGradientPattern | A QRadialGradient. |
Qt::ConicalGradientPattern | A QConicalGradient. |
enum Qt::CaseSensitivity
This enum selects whether a string comparison or search distinguishes upper and lower case.
| Constant | Description |
|---|---|
Qt::CaseInsensitive | Case is ignored. |
Qt::CaseSensitive | Case is significant. |
enum Qt::CheckState
| Constant | Description |
|---|---|
Qt::Unchecked | The item is not checked. |
Qt::PartiallyChecked | Some of the children of the item are checked. |
Qt::Checked | The item is checked. |
enum Qt::ColorScheme
This enum describes the color scheme of the desktop: whether the interface is meant to be light on dark or dark on light. QStyleHints::colorScheme() returns it.
| Constant | Description |
|---|---|
Qt::Unknown | The color scheme is not known; applications should treat it as Light. |
Qt::Light | Dark text on light backgrounds. |
Qt::Dark | Light text on dark backgrounds. |
enum Qt::ConnectionType
This enum describes how a signal is delivered to a slot.
| Constant | Description |
|---|---|
Qt::AutoConnection | The default. The slot is called directly if the receiver lives in the thread that emits the signal, and queued otherwise. The decision is made at emission time. |
Qt::DirectConnection | The slot is called immediately when the signal is emitted, in the emitting thread. |
Qt::QueuedConnection | The arguments are copied and the slot is called later from the event loop of the receiver's thread. |
Qt::BlockingQueuedConnection | Like QueuedConnection, but the emitting thread blocks until the slot has returned. If the receiver lives in the emitting thread, the slot is called directly instead of deadlocking. |
Qt::UniqueConnection | A flag combined with one of the types above: connect() fails if the same signal is already connected to the same slot of the same receiver. It applies to member function slots and to slots named by string, not to functors. |
Qt::SingleShotConnection | A flag combined with one of the types above: the slot is called for the first emission only, and the connection is then removed. |
See also QObject::connect() and Signals and Slots.
enum Qt::CursorShape
The shapes of the mouse cursor, for QCursor.
| Constant | Description |
|---|---|
Qt::ArrowCursor | The standard arrow. |
Qt::UpArrowCursor | An arrow that points up. |
Qt::CrossCursor | A crosshair, for picking a point. |
Qt::WaitCursor | An hourglass or a watch: the application is busy and takes no input. |
Qt::IBeamCursor | A caret, over text that can be selected and edited. |
Qt::SizeVerCursor | A vertical double arrow, for resizing something vertically. |
Qt::SizeHorCursor | A horizontal double arrow. |
Qt::SizeBDiagCursor | A double arrow from the bottom left to the top right. |
Qt::SizeFDiagCursor | A double arrow from the top left to the bottom right. |
Qt::SizeAllCursor | Arrows in the four directions, for moving something. |
Qt::BlankCursor | No cursor at all. |
Qt::SplitVCursor | For dragging a horizontal splitter up and down. |
Qt::SplitHCursor | For dragging a vertical splitter left and right. |
Qt::PointingHandCursor | A hand with a pointing finger, over a link. |
Qt::ForbiddenCursor | A crossed circle: what is dragged cannot be dropped here. |
Qt::WhatsThisCursor | An arrow with a question mark. |
Qt::BusyCursor | An arrow with an hourglass: the application works, but still takes input. |
Qt::OpenHandCursor | An open hand, over something that can be dragged. |
Qt::ClosedHandCursor | A closed hand, while it is dragged. |
Qt::DragCopyCursor | What is dragged will be copied. |
Qt::DragMoveCursor | What is dragged will be moved. |
Qt::DragLinkCursor | A link to what is dragged will be made. |
Qt::BitmapCursor | A cursor made of a bitmap. Nt has none. |
Qt::CustomCursor | A cursor of the platform that has no shape of its own here. |
See also QCursor.
enum Qt::DateFormat
This enum selects the textual format of dates and times.
| Constant | Description |
|---|---|
Qt::TextDate | A locale-independent text form such as Sat Nov 7 2026; the default. |
Qt::ISODate | ISO 8601 extended format, such as 2026-11-07 and 20:10:14. |
Qt::ISODateWithMs | ISO 8601 extended format with milliseconds, such as 20:10:14.844. |
Qt::RFC2822Date | The RFC 2822 format, such as 07 Nov 2026. |
enum Qt::DayOfWeek
The days of the week, numbered as QDate::dayOfWeek() numbers them.
| Constant | Description |
|---|---|
Qt::Monday | Monday, 1. |
Qt::Tuesday | Tuesday, 2. |
Qt::Wednesday | Wednesday, 3. |
Qt::Thursday | Thursday, 4. |
Qt::Friday | Friday, 5. |
Qt::Saturday | Saturday, 6. |
Qt::Sunday | Sunday, 7. |
enum Qt::DockWidgetArea
This enum gives the sides of a QMainWindow where dock widgets go. The DockWidgetAreas type is a typedef for QFlags<DockWidgetArea>.
| Constant | Description |
|---|---|
Qt::LeftDockWidgetArea | The left side. |
Qt::RightDockWidgetArea | The right side. |
Qt::TopDockWidgetArea | The top. |
Qt::BottomDockWidgetArea | The bottom. |
Qt::AllDockWidgetAreas | All the sides. |
Qt::NoDockWidgetArea | None. |
typedef Qt::DockWidgetAreas
The DockWidgetAreas type is a typedef for QFlags<DockWidgetArea>. It stores an OR combination of DockWidgetArea values.
enum Qt::DropAction
The actions a drag and drop operation can perform.
| Constant | Description |
|---|---|
Qt::CopyAction | Copy the data to the target. |
Qt::MoveAction | Move the data from the source to the target. |
Qt::LinkAction | Create a link from the source to the target. |
Qt::ActionMask | The bits of the actions. |
Qt::TargetMoveAction | The target moves the data and the source should not delete it. |
Qt::IgnoreAction | Ignore the action. |
typedef Qt::DropActions
The DropActions type is a typedef for QFlags<DropAction>. It stores an OR combination of DropAction values.
enum Qt::FillRule
This enum describes which points are inside a shape whose outline crosses itself.
| Constant | Description |
|---|---|
Qt::OddEvenFill | A point is inside if a ray from it crosses the outline an odd number of times. |
Qt::WindingFill | A point is inside if the outline winds around it: the windings in each direction do not cancel out. |
enum Qt::FindChildOption
This enum controls how QObject::findChild() and QObject::findChildren() search. The FindChildOptions type is a typedef for QFlags<FindChildOption>.
| Constant | Description |
|---|---|
Qt::FindDirectChildrenOnly | Only direct children are searched. |
Qt::FindChildrenRecursively | All descendants are searched. |
typedef Qt::FindChildOptions
The FindChildOptions type is a typedef for QFlags<FindChildOption>. It stores an OR combination of FindChildOption values.
enum Qt::FocusPolicy
This enum says how a widget gets the keyboard focus.
| Constant | Description |
|---|---|
Qt::NoFocus | The widget does not accept focus. |
Qt::TabFocus | The widget accepts focus by tabbing. |
Qt::ClickFocus | The widget accepts focus by clicking. |
Qt::StrongFocus | The widget accepts focus by tabbing and clicking. |
Qt::WheelFocus | Accepted for compatibility; the same as StrongFocus. |
enum Qt::GlobalColor
This enum names the predefined colors that QColor and QBrush accept.
| Constant | Description |
|---|---|
Qt::color0 | Zero pixel value, transparent in a bitmap. |
Qt::color1 | Pixel value one, opaque in a bitmap. |
Qt::black | Black, 0x000000. |
Qt::white | White, 0xffffff. |
Qt::darkGray | Dark gray, 0x808080. |
Qt::gray | Gray, 0xa0a0a4. |
Qt::lightGray | Light gray, 0xc0c0c0. |
Qt::red | Red, 0xff0000. |
Qt::green | Green, 0x00ff00. |
Qt::blue | Blue, 0x0000ff. |
Qt::cyan | Cyan, 0x00ffff. |
Qt::magenta | Magenta, 0xff00ff. |
Qt::yellow | Yellow, 0xffff00. |
Qt::darkRed | Dark red, 0x800000. |
Qt::darkGreen | Dark green, 0x008000. |
Qt::darkBlue | Dark blue, 0x000080. |
Qt::darkCyan | Dark cyan, 0x008080. |
Qt::darkMagenta | Dark magenta, 0x800080. |
Qt::darkYellow | Dark yellow, 0x808000. |
Qt::transparent | Fully transparent. |
typedef Qt::HANDLE
An opaque thread handle: the value QThread::currentThreadId() returns, a void *.
enum Qt::Initialization
This enum is the tag of the constructors that leave the contents of a container unset, such as QByteArray(size, Qt::Uninitialized), for callers that fill in every element afterwards.
| Constant | Description |
|---|---|
Qt::Uninitialized | The elements need no particular value. Nt value-initializes them: bytes and characters are zero, and class types are default-constructed. |
enum Qt::ItemDataRole
The roles under which an item model stores the data of an item. Roles from UserRole on are for application-specific data.
| Constant | Description |
|---|---|
Qt::DisplayRole | The text shown for the item (QString). |
Qt::DecorationRole | The icon or color shown with the item. |
Qt::EditRole | The data in a form suitable for editing (QString). |
Qt::ToolTipRole | The tool tip of the item (QString). |
Qt::StatusTipRole | The status bar text of the item (QString). |
Qt::WhatsThisRole | The "What's This?" text of the item (QString). |
Qt::FontRole | The font of the item. |
Qt::TextAlignmentRole | The alignment of the text (Qt::Alignment). |
Qt::BackgroundRole | The background of the item. |
Qt::ForegroundRole | The foreground (text) color of the item. |
Qt::CheckStateRole | The check state of the item (Qt::CheckState). |
Qt::AccessibleTextRole | The text for accessibility tools. |
Qt::AccessibleDescriptionRole | The description for accessibility tools. |
Qt::SizeHintRole | The size hint of the item. |
Qt::InitialSortOrderRole | The initial sort order of a header section (Qt::SortOrder). |
Qt::DisplayPropertyRole | Reserved. |
Qt::DecorationPropertyRole | Reserved. |
Qt::ToolTipPropertyRole | Reserved. |
Qt::StatusTipPropertyRole | Reserved. |
Qt::WhatsThisPropertyRole | Reserved. |
Qt::UserRole | The first role for application-specific data. |
enum Qt::ItemFlag
This enum describes what the user can do with an item of a table.
| Constant | Description |
|---|---|
Qt::NoItemFlags | The item cannot be used. |
Qt::ItemIsSelectable | The user can select the item. |
Qt::ItemIsEditable | The user can edit the item. |
Qt::ItemIsDragEnabled | The item can be dragged. |
Qt::ItemIsDropEnabled | The item can be used as a drop target. |
Qt::ItemIsUserCheckable | The user can check or uncheck the item. |
Qt::ItemIsEnabled | The user can interact with the item; a disabled item is drawn in the disabled colors and cannot be selected. |
Qt::ItemIsAutoTristate | The check state of the item depends on the check states of its children. |
Qt::ItemNeverHasChildren | The item never has children; views can use this for optimization. |
Qt::ItemIsUserTristate | The user can cycle through three check states. |
typedef Qt::ItemFlags
The ItemFlags type is a typedef for QFlags<ItemFlag>. It stores an OR combination of ItemFlag values.
enum Qt::Key
This enum holds the keys that QKeyEvent reports. Printable keys use their Latin-1 upper case code, so Key_A is 0x41.
| Constant | Description |
|---|---|
Qt::Key_Escape | The Escape key. |
Qt::Key_Tab | The Tab key. |
Qt::Key_Backtab | Shift+Tab. |
Qt::Key_Backspace | The Backspace key. |
Qt::Key_Return | The main Return key. |
Qt::Key_Enter | The Enter key on the keypad. |
Qt::Key_Insert | The Insert key. |
Qt::Key_Delete | The Delete key. |
Qt::Key_Pause | The Pause key. |
Qt::Key_Print | The Print Screen key. |
Qt::Key_Home | The Home key. |
Qt::Key_End | The End key. |
Qt::Key_Left | The left arrow. |
Qt::Key_Up | The up arrow. |
Qt::Key_Right | The right arrow. |
Qt::Key_Down | The down arrow. |
Qt::Key_PageUp | The Page Up key. |
Qt::Key_PageDown | The Page Down key. |
Qt::Key_Shift | A Shift key. |
Qt::Key_Control | A Ctrl key. |
Qt::Key_Meta | A Meta key. |
Qt::Key_Alt | An Alt key. |
Qt::Key_CapsLock | The Caps Lock key. |
Qt::Key_NumLock | The Num Lock key. |
Qt::Key_ScrollLock | The Scroll Lock key. |
Qt::Key_F1 | The F1 key. |
Qt::Key_F2 | The F2 key. |
Qt::Key_F3 | The F3 key. |
Qt::Key_F4 | The F4 key. |
Qt::Key_F5 | The F5 key. |
Qt::Key_F6 | The F6 key. |
Qt::Key_F7 | The F7 key. |
Qt::Key_F8 | The F8 key. |
Qt::Key_F9 | The F9 key. |
Qt::Key_F10 | The F10 key. |
Qt::Key_F11 | The F11 key. |
Qt::Key_F12 | The F12 key. |
Qt::Key_Space | The space bar. |
Qt::Key_0 | The 0 key. |
Qt::Key_1 | The 1 key. |
Qt::Key_2 | The 2 key. |
Qt::Key_3 | The 3 key. |
Qt::Key_4 | The 4 key. |
Qt::Key_5 | The 5 key. |
Qt::Key_6 | The 6 key. |
Qt::Key_7 | The 7 key. |
Qt::Key_8 | The 8 key. |
Qt::Key_9 | The 9 key. |
Qt::Key_A | The A key. |
Qt::Key_B | The B key. |
Qt::Key_C | The C key. |
Qt::Key_D | The D key. |
Qt::Key_E | The E key. |
Qt::Key_F | The F key. |
Qt::Key_G | The G key. |
Qt::Key_H | The H key. |
Qt::Key_I | The I key. |
Qt::Key_J | The J key. |
Qt::Key_K | The K key. |
Qt::Key_L | The L key. |
Qt::Key_M | The M key. |
Qt::Key_N | The N key. |
Qt::Key_O | The O key. |
Qt::Key_P | The P key. |
Qt::Key_Q | The Q key. |
Qt::Key_R | The R key. |
Qt::Key_S | The S key. |
Qt::Key_T | The T key. |
Qt::Key_U | The U key. |
Qt::Key_V | The V key. |
Qt::Key_W | The W key. |
Qt::Key_X | The X key. |
Qt::Key_Y | The Y key. |
Qt::Key_Z | The Z key. |
Qt::Key_Menu | The Menu key, which opens a context menu. |
Qt::Key_Plus | The + key. |
Qt::Key_Comma | The , key. |
Qt::Key_Minus | The - key. |
Qt::Key_Period | The . key. |
Qt::Key_Slash | The / key. |
Qt::Key_Equal | The = key. |
Qt::Key_unknown | A key without a Qt::Key value. |
enum Qt::KeyboardModifier
This enum describes the modifier keys. The KeyboardModifiers type is a typedef for QFlags<KeyboardModifier>.
| Constant | Description |
|---|---|
Qt::NoModifier | No modifier key is pressed. |
Qt::ShiftModifier | A Shift key is pressed. |
Qt::ControlModifier | A Ctrl key is pressed. |
Qt::AltModifier | An Alt key is pressed. |
Qt::MetaModifier | A Meta (Super, Windows) key is pressed. |
Qt::KeypadModifier | The key is on the keypad. |
typedef Qt::KeyboardModifiers
The KeyboardModifiers type is a typedef for QFlags<KeyboardModifier>. It stores an OR combination of KeyboardModifier values.
enum Qt::LayoutDirection
The direction in which text is written and laid out.
| Constant | Description |
|---|---|
Qt::LeftToRight | Left to right. |
Qt::RightToLeft | Right to left. |
Qt::LayoutDirectionAuto | The direction is determined automatically from the content. |
See also QLocale::textDirection().
enum Qt::MatchFlag
How a text is matched against items, as by QCompleter. The MatchFlags type is a typedef for QFlags<MatchFlag>.
| Constant | Description |
|---|---|
Qt::MatchExactly | The whole text. |
Qt::MatchContains | The text anywhere in the item. |
Qt::MatchStartsWith | The start of the item. |
Qt::MatchEndsWith | The end of the item. |
Qt::MatchRegularExpression | A regular expression (QRegularExpression). |
Qt::MatchWildcard | A shell wildcard pattern. |
Qt::MatchFixedString | The text as a string, ignoring case unless MatchCaseSensitive is set. |
Qt::MatchTypeMask | The bits that hold the kind of match. |
Qt::MatchCaseSensitive | Case matters. |
Qt::MatchWrap | Searching wraps round to the start. |
Qt::MatchRecursive | Items under items are searched too. |
typedef Qt::MatchFlags
The MatchFlags type is a typedef for QFlags<MatchFlag>. It stores an OR combination of MatchFlag values.
enum Qt::Modifier
This enum holds the modifiers as they are added to a key code in a QKeySequence, as in Qt::CTRL | Qt::Key_S.
| Constant | Description |
|---|---|
Qt::SHIFT | The Shift key. |
Qt::CTRL | The Ctrl key. |
Qt::ALT | The Alt key. |
Qt::META | The Meta (Super, Windows) key. |
Qt::MODIFIER_MASK | The bits that a key code does not use, where the modifiers are. |
enum Qt::MouseButton
This enum describes the mouse buttons. The MouseButtons type is a typedef for QFlags<MouseButton>.
| Constant | Description |
|---|---|
Qt::NoButton | No button, as in a mouse move event. |
Qt::LeftButton | The left button. |
Qt::RightButton | The right button. |
Qt::MiddleButton | The middle button, often the wheel. |
Qt::BackButton | The back navigation button. |
Qt::ForwardButton | The forward navigation button. |
Qt::AllButtons | Every button. |
typedef Qt::MouseButtons
The MouseButtons type is a typedef for QFlags<MouseButton>. It stores an OR combination of MouseButton values.
enum Qt::Orientation
This enum describes a direction.
| Constant | Description |
|---|---|
Qt::Horizontal | Left to right. |
Qt::Vertical | Top to bottom. |
typedef Qt::Orientations
The Orientations type is a typedef for QFlags<Orientation>. It stores an OR combination of Orientation values.
enum Qt::PenCapStyle
This enum describes how the ends of lines are drawn.
| Constant | Description |
|---|---|
Qt::FlatCap | The line stops at its end point. |
Qt::SquareCap | The line goes on for half its width past its end point, squarely. |
Qt::RoundCap | The line ends in a half circle around its end point. |
enum Qt::PenJoinStyle
This enum describes how the segments of a line meet.
| Constant | Description |
|---|---|
Qt::MiterJoin | The outer edges are extended to meet, up to the miter limit of the pen. |
Qt::BevelJoin | The corner is cut off. |
Qt::RoundJoin | The corner is rounded. |
Qt::SvgMiterJoin | As MiterJoin; a corner beyond the miter limit is beveled. |
enum Qt::PenStyle
This enum describes how QPainter draws lines.
| Constant | Description |
|---|---|
Qt::NoPen | No line is drawn. |
Qt::SolidLine | A plain line. |
Qt::DashLine | Dashes separated by gaps. |
Qt::DotLine | Dots separated by gaps. |
Qt::DashDotLine | Dashes and dots, alternating. |
Qt::DashDotDotLine | A dash and two dots, repeating. |
Qt::CustomDashLine | The dashes of QPen::dashPattern(). |
enum Qt::ScrollBarPolicy
This enum says when a scroll area shows a scroll bar.
| Constant | Description |
|---|---|
Qt::ScrollBarAsNeeded | The scroll bar is shown when the contents do not fit. |
Qt::ScrollBarAlwaysOff | The scroll bar is never shown. |
Qt::ScrollBarAlwaysOn | The scroll bar is always shown. |
enum Qt::SizeMode
This enum describes how the radii of rounded rectangles are given.
| Constant | Description |
|---|---|
Qt::AbsoluteSize | In the units of the painter. |
Qt::RelativeSize | As percentages of half the width and half the height of the rectangle. |
enum Qt::SortOrder
This enum says in which direction items are sorted.
| Constant | Description |
|---|---|
Qt::AscendingOrder | From the smallest to the largest. |
Qt::DescendingOrder | From the largest to the smallest. |
typedef Qt::SplitBehavior
The SplitBehavior type is a typedef for QFlags<SplitBehaviorFlags>. It stores an OR combination of SplitBehaviorFlags values.
enum Qt::SplitBehaviorFlags
This enum controls whether empty parts are kept when splitting a string. The SplitBehavior type is a typedef for QFlags<SplitBehaviorFlags>.
| Constant | Description |
|---|---|
Qt::KeepEmptyParts | Empty parts are kept in the result. |
Qt::SkipEmptyParts | Empty parts are left out of the result. |
enum Qt::TextElideMode
This enum says where QFontMetrics::elidedText() replaces text with an ellipsis.
| Constant | Description |
|---|---|
Qt::ElideLeft | The ellipsis is at the start of the text. |
Qt::ElideRight | The ellipsis is at the end of the text. |
Qt::ElideMiddle | The ellipsis is in the middle of the text. |
Qt::ElideNone | The text is not shortened. |
enum Qt::TextFlag
This enum holds the flags that QPainter::drawText() and QFontMetrics::boundingRect() accept in addition to Qt::AlignmentFlag.
| Constant | Description |
|---|---|
Qt::TextSingleLine | Treats all whitespace, new lines included, as spaces. |
Qt::TextDontClip | Text that does not fit is drawn outside the rectangle instead of being clipped. |
Qt::TextWordWrap | Breaks lines at word boundaries to fit the width of the rectangle. |
Qt::TextWrapAnywhere | Breaks lines between any two characters if a word does not fit. |
enum Qt::TextFormat
This enum says how a text is to be read, by a QLabel for example.
| Constant | Description |
|---|---|
Qt::PlainText | The text is shown as it is. |
Qt::RichText | The text is HTML, as QTextDocument::setHtml() reads it. |
Qt::AutoText | The text is rich text if Qt::mightBeRichText() says so, and plain text otherwise. |
Qt::MarkdownText | The text is Markdown. Nt shows it as plain text. |
enum Qt::TimerId
The type of a timer identifier, as returned by QTimer::id() and QBasicTimer::id(). The value is the int identifier that QObject::startTimer() returns.
| Constant | Description |
|---|---|
Qt::Invalid | The identifier of a timer that is not running. |
This function was introduced in 6.8.
See also QTimer::id(), QBasicTimer::id() and QTimerEvent::id().
enum Qt::TimerType
This enum describes the accuracy a timer should have.
| Constant | Description |
|---|---|
Qt::PreciseTimer | Accepted for compatibility; it has no effect. |
Qt::CoarseTimer | Accepted for compatibility; it has no effect. |
Qt::VeryCoarseTimer | Accepted for compatibility; it has no effect. |
See also QBasicTimer and QTimer.
enum Qt::TimeSpec
This enum describes how a date and time is to be interpreted.
| Constant | Description |
|---|---|
Qt::LocalTime | The local time of the system. |
Qt::UTC | Coordinated Universal Time. |
Qt::OffsetFromUTC | A fixed offset in seconds from UTC. |
Qt::TimeZone | A time zone given as a QTimeZone. |
enum Qt::ToolBarArea
This enum gives the sides of a QMainWindow where tool bars go. The ToolBarAreas type is a typedef for QFlags<ToolBarArea>.
| Constant | Description |
|---|---|
Qt::LeftToolBarArea | The left side. |
Qt::RightToolBarArea | The right side. |
Qt::TopToolBarArea | The top, below the menu bar. |
Qt::BottomToolBarArea | The bottom, above the status bar. |
Qt::AllToolBarAreas | All the sides. |
Qt::NoToolBarArea | None. |
typedef Qt::ToolBarAreas
The ToolBarAreas type is a typedef for QFlags<ToolBarArea>. It stores an OR combination of ToolBarArea values.
enum Qt::ToolButtonStyle
This enum says what a tool button shows.
| Constant | Description |
|---|---|
Qt::ToolButtonIconOnly | Only the icon. |
Qt::ToolButtonTextOnly | Only the text. |
Qt::ToolButtonTextBesideIcon | The text beside the icon. |
Qt::ToolButtonTextUnderIcon | The text under the icon. |
Qt::ToolButtonFollowStyle | What the style says. |
enum Qt::WhiteSpaceMode
This enum says what Qt::convertFromPlainText() does with white space.
| Constant | Description |
|---|---|
Qt::WhiteSpaceNormal | Spaces are left to the rules of HTML, which show a run of them as one. |
Qt::WhiteSpacePre | Spaces are kept as they are. |
Qt::WhiteSpaceNoWrap | Spaces are left as with WhiteSpaceNormal. |
enum Qt::WidgetAttribute
The attributes of a widget, which QWidget::setAttribute() sets and QWidget::testAttribute() reads. The numbers are those of Qt. Nt has the attributes listed here; of these, the ones described as kept for the application are stored and returned, and change nothing by themselves.
| Constant | Description |
|---|---|
Qt::WA_Disabled | The widget is disabled; the same as QWidget::setEnabled() with false. |
Qt::WA_UnderMouse | The mouse is over the widget. Set by Nt; see QWidget::underMouse(). |
Qt::WA_MouseTracking | The widget gets mouse move events while no button is down; see QWidget::setMouseTracking(). |
Qt::WA_OpaquePaintEvent | The widget paints all of its pixels itself, so its background is not filled first. |
Qt::WA_StaticContents | Kept for the application. |
Qt::WA_NoSystemBackground | The background of the widget is not filled before it is painted. |
Qt::WA_UpdatesDisabled | The widget is not repainted; see QWidget::setUpdatesEnabled(). |
Qt::WA_InputMethodEnabled | Kept for the application; Nt has no input methods. |
Qt::WA_SetPalette | The widget has a palette of its own. Set by QWidget::setPalette(). |
Qt::WA_SetFont | The widget has a font of its own. Set by QWidget::setFont(). |
Qt::WA_SetCursor | The widget has a cursor of its own. Set by QWidget::setCursor(). |
Qt::WA_WindowModified | The window has changes that are not saved; see QWidget::setWindowModified(). |
Qt::WA_Resized | Kept for the application. |
Qt::WA_Moved | Kept for the application. |
Qt::WA_TransparentForMouseEvents | The mouse does not find the widget or its children: events go to what is behind them. |
Qt::WA_DeleteOnClose | The widget is deleted when it is closed and accepts the close event. |
Qt::WA_ShowModal | Kept for the application; use QWidget::setWindowModality(). |
Qt::WA_NoMousePropagation | A mouse event that the widget does not accept is not passed on to its parent. |
Qt::WA_Hover | The widget is repainted when the mouse enters or leaves it. Nt repaints every widget then, so this changes nothing. |
Qt::WA_QuitOnClose | The window counts as one of those that keep the application running: closing the last of them quits it. On by default for windows. |
Qt::WA_KeyboardFocusChange | Kept for the application. |
Qt::WA_AcceptDrops | Kept for the application; Nt has no drag and drop. |
Qt::WA_AlwaysShowToolTips | Kept for the application: Nt shows tool tips in windows that are not active too. |
Qt::WA_SetStyle | The widget has a style of its own. Set by QWidget::setStyle(). |
Qt::WA_StyledBackground | Kept for the application; Nt has no style sheets. |
Qt::WA_ShowWithoutActivating | Kept for the application: whether a window that is shown becomes active is up to the window system. |
Qt::WA_TranslucentBackground | Kept for the application; windows of Nt are opaque. |
Qt::WA_AcceptTouchEvents | Kept for the application; Nt has no touch events. |
See also QWidget::setAttribute() and QWidget::testAttribute().
typedef Qt::WindowFlags
The WindowFlags type is a typedef for QFlags<WindowType>. It stores an OR combination of WindowType values.
enum Qt::WindowModality
This enum says which windows a modal window blocks the input of while it is shown.
| Constant | Description |
|---|---|
Qt::NonModal | None. |
Qt::WindowModal | Its parent window, and the parent window of that, and so on. |
Qt::ApplicationModal | All the other windows of the application. |
enum Qt::WindowState
The state of a window, such as a QMdiSubWindow. The WindowStates type is a typedef for QFlags<WindowState>.
| Constant | Description |
|---|---|
Qt::WindowNoState | Normal. |
Qt::WindowMinimized | Minimized to a title bar or an icon. |
Qt::WindowMaximized | Taking all the room it has. |
Qt::WindowFullScreen | Taking the whole screen. |
Qt::WindowActive | The active window. |
typedef Qt::WindowStates
The WindowStates type is a typedef for QFlags<WindowState>. It stores an OR combination of WindowState values.
enum Qt::WindowType
This enum gives the kind of window a widget is, and hints for how the window system decorates it. The WindowFlags type is a typedef for QFlags<WindowType>.
| Constant | Description |
|---|---|
Qt::Widget | A widget that is a child of its parent; with no parent it is a window anyway. |
Qt::Window | A window, even if the widget has a parent. |
Qt::Dialog | A dialog: a window that the window system keeps above its parent. |
Qt::Sheet | Accepted for compatibility; the same as Dialog. |
Qt::Drawer | Accepted for compatibility; the same as Dialog. |
Qt::Popup | A popup window, such as a menu. |
Qt::Tool | A tool window, kept above its parent. |
Qt::ToolTip | A tool tip. |
Qt::SplashScreen | A splash screen. |
Qt::SubWindow | A child window inside another widget. |
Qt::WindowType_Mask | The bits of the flags that hold the kind of window. |
Qt::MSWindowsFixedSizeDialogHint | Accepted for compatibility; it does nothing. |
Qt::FramelessWindowHint | A window without a frame or a title bar. |
Qt::WindowTitleHint | A window with a title bar. |
Qt::WindowSystemMenuHint | A window with a window menu. |
Qt::WindowMinimizeButtonHint | A window with a button that minimizes it. |
Qt::WindowMaximizeButtonHint | A window with a button that maximizes it. |
Qt::WindowMinMaxButtonsHint | Both of the above. |
Qt::WindowContextHelpButtonHint | A window with a help button. |
Qt::WindowStaysOnTopHint | A window that is kept above the others. |
Qt::WindowCloseButtonHint | A window with a close button. |
Qt::CustomizeWindowHint | The decoration hints replace the ones the window system would choose. |
Function Documentation
QTextStream & Qt::bin(QTextStream &s)
Calls QTextStream::setIntegerBase() with base 2 on the stream s and returns s.
QTextStream & Qt::bom(QTextStream &s)
Calls QTextStream::setGenerateByteOrderMark() with true on the stream s and returns s.
QTextStream & Qt::center(QTextStream &s)
Sets the field alignment of the stream s to QTextStream::AlignCenter and returns s.
See also QTextStream::setFieldAlignment().
QString Qt::convertFromPlainText(const QString &plain, WhiteSpaceMode mode = WhiteSpacePre)
Returns plain as HTML that shows the same text: the characters that mean something in HTML are escaped, and the line breaks are kept. With mode Qt::WhiteSpacePre the spaces are kept too.
See also mightBeRichText().
QTextStream & Qt::dec(QTextStream &s)
Calls QTextStream::setIntegerBase() with base 10 on the stream s and returns s.
QTextStream & Qt::endl(QTextStream &s)
Writes a newline character to the stream s, flushes it, and returns s.
See also QTextStream::flush().
QTextStream & Qt::fixed(QTextStream &s)
Sets the real number notation of the stream s to QTextStream::FixedNotation and returns s.
See also QTextStream::setRealNumberNotation().
QTextStream & Qt::flush(QTextStream &s)
Flushes the stream s and returns s.
See also QTextStream::flush().
QTextStream & Qt::forcepoint(QTextStream &s)
Sets the ForcePoint number flag on the stream s and returns s.
See also QTextStream::setNumberFlags().
QTextStream & Qt::forcesign(QTextStream &s)
Sets the ForceSign number flag on the stream s and returns s.
See also QTextStream::setNumberFlags().
QTextStream & Qt::hex(QTextStream &s)
Calls QTextStream::setIntegerBase() with base 16 on the stream s and returns s.
QTextStream & Qt::left(QTextStream &s)
Sets the field alignment of the stream s to QTextStream::AlignLeft and returns s.
See also QTextStream::setFieldAlignment().
QTextStream & Qt::lowercasebase(QTextStream &s)
Clears the UppercaseBase number flag on the stream s and returns s.
See also QTextStream::setNumberFlags().
QTextStream & Qt::lowercasedigits(QTextStream &s)
Clears the UppercaseDigits number flag on the stream s and returns s.
See also QTextStream::setNumberFlags().
bool Qt::mightBeRichText(const QString &text)
Returns true if text looks like rich text: if its first line has a tag of HTML. A QLabel uses this to decide how to show a text whose format it was not told.
See also convertFromPlainText().
QTextStream & Qt::noforcepoint(QTextStream &s)
Clears the ForcePoint number flag on the stream s and returns s.
See also QTextStream::setNumberFlags().
QTextStream & Qt::noforcesign(QTextStream &s)
Clears the ForceSign number flag on the stream s and returns s.
See also QTextStream::setNumberFlags().
QTextStream & Qt::noshowbase(QTextStream &s)
Clears the ShowBase number flag on the stream s and returns s.
See also QTextStream::setNumberFlags().
QTextStream & Qt::oct(QTextStream &s)
Calls QTextStream::setIntegerBase() with base 8 on the stream s and returns s.
QTextStream & Qt::reset(QTextStream &s)
Resets the formatting options of the stream s to their defaults and returns s.
See also QTextStream::reset().
QTextStream & Qt::right(QTextStream &s)
Sets the field alignment of the stream s to QTextStream::AlignRight and returns s.
See also QTextStream::setFieldAlignment().
QTextStream & Qt::scientific(QTextStream &s)
Sets the real number notation of the stream s to QTextStream::ScientificNotation and returns s.
See also QTextStream::setRealNumberNotation().
QTextStream & Qt::showbase(QTextStream &s)
Sets the ShowBase number flag on the stream s and returns s.
See also QTextStream::setNumberFlags().
QTextStream & Qt::uppercasebase(QTextStream &s)
Sets the UppercaseBase number flag on the stream s and returns s.
See also QTextStream::setNumberFlags().
QTextStream & Qt::uppercasedigits(QTextStream &s)
Sets the UppercaseDigits number flag on the stream s and returns s.
See also QTextStream::setNumberFlags().
QTextStream & Qt::ws(QTextStream &s)
Skips whitespace in the stream s and returns s.
See also QTextStream::skipWhiteSpace().
Member Variable Documentation
namespace Qt::Literals
The Qt::Literals inline namespace holds the user-defined literal operators of Nt, so they are found through using namespace Qt::Literals, using namespace Qt::StringLiterals or using namespace Qt. The string literals _s (a QString from a u"" literal) and _L1 (a QLatin1StringView or QChar from a Latin-1 literal) are provided.