Qt(3qt)
π Qt(3qt) π
okay bestie, welcome to the Qt manual page β this is the Qt namespace, aka the group chat where all the random global-ish identifiers hang out because they literally cannot live anywhere else. β¨
πΈ NAME πΈ
Qt β the namespace for all those miscellaneous identifiers that just need to be global-like. it's giving "we don't fit anywhere else so we live here now" energy and honestly? respect. π
β¨ SYNOPSIS β¨
so you wanna use it? pull in the header like this:
#include <qnamespace.h>
and that's it, that's the whole vibe. no cap. π
π¦ Inherited by π¦
bestie. sit down. this namespace is the main character and basically everyone inherits from it. the full roster, no skipping, we list all of them because every single one matters:
QObjectQPixmapQBrushQCanvasItemQCursorQPainterQEventQIconViewItemQKeySequenceQListViewItemQCustomMenuItemQPenQStyleSheetItemQSyntaxHighlighterQTabQTableItemQThreadQToolTipQWhatsThis
likeβ¦ that's a whole friend group and they ALL trace back here. iconic behavior, fr fr. π
okay that's part 1, stay tuned because there is so much more coming and we are not done yet π«Ά
β¨ Public Members β¨
okay bestie, part 2 is literally the public members of the Qt namespace, and it's giving enum energy. every single hex code, every alias, every obsolete flag β it's all here. no cap. let's go π β¨
enum ButtonStateβ the way that this is literally the mouse button and modifier flags, no cap:
enum ButtonState { NoButton = 0x0000, LeftButton = 0x0001, RightButton =
0x0002, MidButton = 0x0004, MouseButtonMask = 0x0007, ShiftButton =
0x0100, ControlButton = 0x0200, AltButton = 0x0400, MetaButton =
0x0800, KeyButtonMask = 0x0f00, Keypad = 0x4000 }
enum Orientationβ horizontal or vertical, that's the whole vibe:
enum Orientation { Horizontal = 0, Vertical }
enum SortOrderβ ascending or descending, periodt:
enum SortOrder { Ascending, Descending }
enum AlignmentFlagsβ all the alignment bits, bestie, with masks and everything:
enum AlignmentFlags { AlignAuto = 0x0000, AlignLeft = 0x0001, AlignRight
= 0x0002, AlignHCenter = 0x0004, AlignJustify = 0x0008,
AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter |
AlignJustify, AlignTop = 0x0010, AlignBottom = 0x0020, AlignVCenter
= 0x0040, AlignVertical_Mask = AlignTop | AlignBottom |
AlignVCenter, AlignCenter = AlignVCenter | AlignHCenter }
enum TextFlagsβ text rendering flags, slay:
enum TextFlags { SingleLine = 0x0080, DontClip = 0x0100, ExpandTabs =
0x0200, ShowPrefix = 0x0400, WordBreak = 0x0800, BreakAnywhere =
0x1000, NoAccel = 0x4000 }
enum WidgetStateβ the way that this is literally every widget state flag, iykyk:
enum WidgetState { WState_Created = 0x00000001, WState_Disabled =
0x00000002, WState_Visible = 0x00000004, WState_ForceHide =
0x00000008, WState_OwnCursor = 0x00000010, WState_MouseTracking =
0x00000020, WState_CompressKeys = 0x00000040, WState_BlockUpdates =
0x00000080, WState_InPaintEvent = 0x00000100, WState_Reparented =
0x00000200, WState_ConfigPending = 0x00000400, WState_Resized =
0x00000800, WState_AutoMask = 0x00001000, WState_Polished =
0x00002000, WState_DND = 0x00004000, WState_Reserved0 = 0x00008000,
WState_FullScreen = 0x00010000, WState_OwnSizePolicy = 0x00020000,
WState_CreatedHidden = 0x00040000, WState_Maximized = 0x00080000,
WState_Minimized = 0x00100000, WState_ForceDisabled = 0x00200000,
WState_Exposed = 0x00400000, WState_HasMouse = 0x00800000 }
enum WidgetFlagsβ okay this one is huge and has some duplicate entries, but we're keeping every single character exactly as it is, no cap:
enum WidgetFlags { WType_TopLevel = 0x00000001, WType_Dialog =
0x00000002, WType_Popup = 0x00000004, WType_Desktop = 0x00000008,
WType_Mask = 0x0000000f, WStyle_Customize = 0x00000010,
WStyle_NormalBorder = 0x00000020, WStyle_DialogBorder = 0x00000040,
WStyle_NoBorder = 0x00002000, WStyle_Title = 0x00000080,
WStyle_SysMenu = 0x00000100, WStyle_Minimize = 0x00000200,
WStyle_Maximize = 0x00000400, WStyle_MinMax = WStyle_Minimize |
WStyle_Maximize, WStyle_Tool = 0x00000800, WStyle_StaysOnTop =
0x00001000, WStyle_ContextHelp = 0x00004000, WStyle_Reserved =
0x00008000, WStyle_Mask = 0x0000fff0, WDestructiveClose =
0x00010000, WPaintDesktop = 0x00020000, WPaintUnclipped =
0x00040000, WPaintClever = 0x00080000, WResizeNoErase = 0x00100000,
WMouseNoMask = 0x00200000, WStaticContents = 0x00400000,
WRepaintNoErase = 0x00800000, WX11BypassWM = 0x01000000, WWinOwnDC =
0x00000000, WMacNoSheet = 0x00000000, WMacDrawer = 0x00000000,
WX11BypassWM = 0x00000000, WWinOwnDC = 0x01000000, WMacNoSheet =
0x00000000, WMacDrawer = 0x00000000, WGroupLeader = 0x02000000,
WShowModal = 0x04000000, WNoMousePropagation = 0x08000000,
WSubWindow = 0x10000000, WStyle_Splash = 0x20000000, WNoAutoErase =
WRepaintNoErase | WResizeNoErase, WNorthWestGravity =
WStaticContents, WType_Modal = WType_Dialog | WShowModal,
WStyle_Dialog = WType_Dialog, WStyle_NoBorderEx = WStyle_NoBorder }
enum WindowStateβ window states, iconic:
enum WindowState { WindowNoState = 0x00000000, WindowMinimized =
0x00000001, WindowMaximized = 0x00000002, WindowFullScreen =
0x00000004, WindowActive = 0x00000008 }
enum ImageConversionFlagsβ all the image conversion flags, bestie:
enum ImageConversionFlags { ColorMode_Mask = 0x00000003, AutoColor =
0x00000000, ColorOnly = 0x00000003, MonoOnly = 0x00000002,
AlphaDither_Mask = 0x0000000c, ThresholdAlphaDither = 0x00000000,
OrderedAlphaDither = 0x00000004, DiffuseAlphaDither = 0x00000008,
NoAlpha = 0x0000000c, Dither_Mask = 0x00000030, DiffuseDither =
0x00000000, OrderedDither = 0x00000010, ThresholdDither =
0x00000020, DitherMode_Mask = 0x000000c0, AutoDither = 0x00000000,
PreferDither = 0x00000040, AvoidDither = 0x00000080 }
enum BGModeβ background mode, transparent or opaque:
enum BGMode { TransparentMode, OpaqueMode }
enum PaintUnitβ paint units, all the metric and English vibes:
enum PaintUnit { PixelUnit, LoMetricUnit, HiMetricUnit, LoEnglishUnit,
HiEnglishUnit, TwipsUnit }
enum GUIStyleβ this one is obsolete, bestie, but it's still here:
enum GUIStyle { MacStyle, WindowsStyle, Win3Style, PMStyle, MotifStyle }
(obsolete)
enum SequenceMatchβ no match, partial match, or identical:
enum SequenceMatch { NoMatch, PartialMatch, Identical }
enum Modifierβ modifier keys, slay:
enum Modifier { META = 0x00100000, SHIFT = 0x00200000, CTRL =
0x00400000, ALT = 0x00800000, MODIFIER_MASK = 0x00f00000,
UNICODE_ACCEL = 0x10000000, ASCII_ACCEL = UNICODE_ACCEL }
enum Keyβ okay this is the big one, every single key code fromKey_EscapetoKey_unknown, and we're keeping all of them exactly. no skips. periodt:
enum Key { Key_Escape = 0x1000, Key_Tab = 0x1001, Key_Backtab = 0x1002,
Key_BackTab = Key_Backtab, Key_Backspace = 0x1003, Key_BackSpace =
Key_Backspace, Key_Return = 0x1004, Key_Enter = 0x1005, Key_Insert =
0x1006, Key_Delete = 0x1007, Key_Pause = 0x1008, Key_Print = 0x1009,
Key_SysReq = 0x100a, Key_Clear = 0x100b, Key_Home = 0x1010, Key_End
= 0x1011, Key_Left = 0x1012, Key_Up = 0x1013, Key_Right = 0x1014,
Key_Down = 0x1015, Key_Prior = 0x1016, Key_PageUp = Key_Prior,
Key_Next = 0x1017, Key_PageDown = Key_Next, Key_Shift = 0x1020,
Key_Control = 0x1021, Key_Meta = 0x1022, Key_Alt = 0x1023,
Key_CapsLock = 0x1024, Key_NumLock = 0x1025, Key_ScrollLock =
0x1026, Key_F1 = 0x1030, Key_F2 = 0x1031, Key_F3 = 0x1032, Key_F4 =
0x1033, Key_F5 = 0x1034, Key_F6 = 0x1035, Key_F7 = 0x1036, Key_F8 =
0x1037, Key_F9 = 0x1038, Key_F10 = 0x1039, Key_F11 = 0x103a, Key_F12
= 0x103b, Key_F13 = 0x103c, Key_F14 = 0x103d, Key_F15 = 0x103e,
Key_F16 = 0x103f, Key_F17 = 0x1040, Key_F18 = 0x1041, Key_F19 =
0x1042, Key_F20 = 0x1043, Key_F21 = 0x1044, Key_F22 = 0x1045,
Key_F23 = 0x1046, Key_F24 = 0x1047, Key_F25 = 0x1048, Key_F26 =
0x1049, Key_F27 = 0x104a, Key_F28 = 0x104b, Key_F29 = 0x104c,
Key_F30 = 0x104d, Key_F31 = 0x104e, Key_F32 = 0x104f, Key_F33 =
0x1050, Key_F34 = 0x1051, Key_F35 = 0x1052, Key_Super_L = 0x1053,
Key_Super_R = 0x1054, Key_Menu = 0x1055, Key_Hyper_L = 0x1056,
Key_Hyper_R = 0x1057, Key_Help = 0x1058, Key_Direction_L = 0x1059,
Key_Direction_R = 0x1060, Key_Space = 0x20, Key_Any = Key_Space,
Key_Exclam = 0x21, Key_QuoteDbl = 0x22, Key_NumberSign = 0x23,
Key_Dollar = 0x24, Key_Percent = 0x25, Key_Ampersand = 0x26,
Key_Apostrophe = 0x27, Key_ParenLeft = 0x28, Key_ParenRight = 0x29,
Key_Asterisk = 0x2a, Key_Plus = 0x2b, Key_Comma = 0x2c, Key_Minus =
0x2d, Key_Period = 0x2e, Key_Slash = 0x2f, Key_0 = 0x30, Key_1 =
0x31, Key_2 = 0x32, Key_3 = 0x33, Key_4 = 0x34, Key_5 = 0x35, Key_6
= 0x36, Key_7 = 0x37, Key_8 = 0x38, Key_9 = 0x39, Key_Colon = 0x3a,
Key_Semicolon = 0x3b, Key_Less = 0x3c, Key_Equal = 0x3d, Key_Greater
= 0x3e, Key_Question = 0x3f, Key_At = 0x40, Key_A = 0x41, Key_B =
0x42, Key_C = 0x43, Key_D = 0x44, Key_E = 0x45, Key_F = 0x46, Key_G
= 0x47, Key_H = 0x48, Key_I = 0x49, Key_J = 0x4a, Key_K = 0x4b,
Key_L = 0x4c, Key_M = 0x4d, Key_N = 0x4e, Key_O = 0x4f, Key_P =
0x50, Key_Q = 0x51, Key_R = 0x52, Key_S = 0x53, Key_T = 0x54, Key_U
= 0x55, Key_V = 0x56, Key_W = 0x57, Key_X = 0x58, Key_Y = 0x59,
Key_Z = 0x5a, Key_BracketLeft = 0x5b, Key_Backslash = 0x5c,
Key_BracketRight = 0x5d, Key_AsciiCircum = 0x5e, Key_Underscore =
0x5f, Key_QuoteLeft = 0x60, Key_BraceLeft = 0x7b, Key_Bar = 0x7c,
Key_BraceRight = 0x7d, Key_AsciiTilde = 0x7e, Key_nobreakspace =
0x0a0, Key_exclamdown = 0x0a1, Key_cent = 0x0a2, Key_sterling =
0x0a3, Key_currency = 0x0a4, Key_yen = 0x0a5, Key_brokenbar = 0x0a6,
Key_section = 0x0a7, Key_diaeresis = 0x0a8, Key_copyright = 0x0a9,
Key_ordfeminine = 0x0aa, Key_guillemotleft = 0x0ab, Key_notsign =
0x0ac, Key_hyphen = 0x0ad, Key_registered = 0x0ae, Key_macron =
0x0af, Key_degree = 0x0b0, Key_plusminus = 0x0b1, Key_twosuperior =
0x0b2, Key_threesuperior = 0x0b3, Key_acute = 0x0b4, Key_mu = 0x0b5,
Key_paragraph = 0x0b6, Key_periodcentered = 0x0b7, Key_cedilla =
0x0b8, Key_onesuperior = 0x0b9, Key_masculine = 0x0ba,
Key_guillemotright = 0x0bb, Key_onequarter = 0x0bc, Key_onehalf =
0x0bd, Key_threequarters = 0x0be, Key_questiondown = 0x0bf,
Key_Agrave = 0x0c0, Key_Aacute = 0x0c1, Key_Acircumflex = 0x0c2,
Key_Atilde = 0x0c3, Key_Adiaeresis = 0x0c4, Key_Aring = 0x0c5,
Key_AE = 0x0c6, Key_Ccedilla = 0x0c7, Key_Egrave = 0x0c8, Key_Eacute
= 0x0c9, Key_Ecircumflex = 0x0ca, Key_Ediaeresis = 0x0cb, Key_Igrave
= 0x0cc, Key_Iacute = 0x0cd, Key_Icircumflex = 0x0ce, Key_Idiaeresis
= 0x0cf, Key_ETH = 0x0d0, Key_Ntilde = 0x0d1, Key_Ograve = 0x0d2,
Key_Oacute = 0x0d3, Key_Ocircumflex = 0x0d4, Key_Otilde = 0x0d5,
Key_Odiaeresis = 0x0d6, Key_multiply = 0x0d7, Key_Ooblique = 0x0d8,
Key_Ugrave = 0x0d9, Key_Uacute = 0x0da, Key_Ucircumflex = 0x0db,
Key_Udiaeresis = 0x0dc, Key_Yacute = 0x0dd, Key_THORN = 0x0de,
Key_ssharp = 0x0df, Key_agrave = 0x0e0, Key_aacute = 0x0e1,
Key_acircumflex = 0x0e2, Key_atilde = 0x0e3, Key_adiaeresis = 0x0e4,
Key_aring = 0x0e5, Key_ae = 0x0e6, Key_ccedilla = 0x0e7, Key_egrave
= 0x0e8, Key_eacute = 0x0e9, Key_ecircumflex = 0x0ea, Key_ediaeresis
= 0x0eb, Key_igrave = 0x0ec, Key_iacute = 0x0ed, Key_icircumflex =
0x0ee, Key_idiaeresis = 0x0ef, Key_eth = 0x0f0, Key_ntilde = 0x0f1,
Key_ograve = 0x0f2, Key_oacute = 0x0f3, Key_ocircumflex = 0x0f4,
Key_otilde = 0x0f5, Key_odiaeresis = 0x0f6, Key_division = 0x0f7,
Key_oslash = 0x0f8, Key_ugrave = 0x0f9, Key_uacute = 0x0fa,
Key_ucircumflex = 0x0fb, Key_udiaeresis = 0x0fc, Key_yacute = 0x0fd,
Key_thorn = 0x0fe, Key_ydiaeresis = 0x0ff, Key_Back = 0x1061,
Key_Forward = 0x1062, Key_Stop = 0x1063, Key_Refresh = 0x1064,
Key_VolumeDown = 0x1070, Key_VolumeMute = 0x1071, Key_VolumeUp =
0x1072, Key_BassBoost = 0x1073, Key_BassUp = 0x1074, Key_BassDown =
0x1075, Key_TrebleUp = 0x1076, Key_TrebleDown = 0x1077,
Key_MediaPlay = 0x1080, Key_MediaStop = 0x1081, Key_MediaPrev =
0x1082, Key_MediaNext = 0x1083, Key_MediaRecord = 0x1084,
Key_HomePage = 0x1090, Key_Favorites = 0x1091, Key_Search = 0x1092,
Key_Standby = 0x1093, Key_OpenUrl = 0x1094, Key_LaunchMail = 0x10a0,
Key_LaunchMedia = 0x10a1, Key_Launch0 = 0x10a2, Key_Launch1 =
0x10a3, Key_Launch2 = 0x10a4, Key_Launch3 = 0x10a5, Key_Launch4 =
0x10a6, Key_Launch5 = 0x10a7, Key_Launch6 = 0x10a8, Key_Launch7 =
0x10a9, Key_Launch8 = 0x10aa, Key_Launch9 = 0x10ab, Key_LaunchA =
0x10ac, Key_LaunchB = 0x10ad, Key_LaunchC = 0x10ae, Key_LaunchD =
0x10af, Key_LaunchE = 0x10b0, Key_LaunchF = 0x10b1, Key_MediaLast =
0x1fff, Key_unknown = 0xffff }
enum ArrowTypeβ up, down, left, right arrows:
enum ArrowType { UpArrow, DownArrow, LeftArrow, RightArrow }
enum RasterOpβ raster operations, all the ROPs you could ever want:
enum RasterOp { CopyROP, OrROP, XorROP, NotAndROP, EraseROP = NotAndROP,
NotCopyROP, NotOrROP, NotXorROP, AndROP, NotEraseROP = AndROP,
NotROP, ClearROP, SetROP, NopROP, AndNotROP, OrNotROP, NandROP,
NorROP, LastROP = NorROP }
enum PenStyleβ pen styles, and this one cuts off here because part 3 is coming, bestie:
enum PenStyle { NoPen, SolidLine, DashLine, DotLine, DashDotLine,
DashDotDotLine, MPenStyle = 0x0f }
enum PenCapStyle { FlatCap = 0x00, SquareCap = 0x10, RoundCap = 0x20,
MPenCapStyle = 0x30 }
enum PenJoinStyle { MiterJoin = 0x00, BevelJoin = 0x40, RoundJoin =
0x80, MPenJoinStyle = 0xc0 }
enum BrushStyle { NoBrush, SolidPattern, Dense1Pattern, Dense2Pattern,
Dense3Pattern, Dense4Pattern, Dense5Pattern, Dense6Pattern,
Dense7Pattern, HorPattern, VerPattern, CrossPattern, BDiagPattern,
FDiagPattern, DiagCrossPattern, CustomPattern = 24 }
enum MacintoshVersion { MV_Unknown = 0x0000, MV_9 = 0x0001, MV_10_DOT_0
= 0x0002, MV_10_DOT_1 = 0x0003, MV_10_DOT_2 = 0x0004, MV_10_DOT_3 =
0x0005, MV_10_DOT_4 = 0x0006, MV_CHEETAH = MV_10_DOT_0, MV_PUMA =
MV_10_DOT_1, MV_JAGUAR = MV_10_DOT_2, MV_PANTHER = MV_10_DOT_3,
MV_TIGER = MV_10_DOT_4 }
enum WindowsVersion { WV_32s = 0x0001, WV_95 = 0x0002, WV_98 = 0x0003,
WV_Me = 0x0004, WV_DOS_based = 0x000f, WV_NT = 0x0010, WV_2000 =
0x0020, WV_XP = 0x0030, WV_2003 = 0x0040, WV_VISTA = 0x0080,
WV_NT_based = 0x00f0, WV_CE = 0x0100, WV_CENET = 0x0200, WV_CE_based
= 0x0f00 }
enum UIEffect { UI_General, UI_AnimateMenu, UI_FadeMenu,
UI_AnimateCombo, UI_AnimateTooltip, UI_FadeTooltip,
UI_AnimateToolBox }
enum CursorShape { ArrowCursor, UpArrowCursor, CrossCursor, WaitCursor,
IbeamCursor, SizeVerCursor, SizeHorCursor, SizeBDiagCursor,
SizeFDiagCursor, SizeAllCursor, BlankCursor, SplitVCursor,
SplitHCursor, PointingHandCursor, ForbiddenCursor, WhatsThisCursor,
BusyCursor, LastCursor = BusyCursor, BitmapCursor = 24 }
enum TextFormat { PlainText, RichText, AutoText, LogText }
enum AnchorAttribute { AnchorName, AnchorHref }
enum Dock { DockUnmanaged, DockTornOff, DockTop, DockBottom, DockRight,
DockLeft, DockMinimized, Unmanaged = DockUnmanaged, TornOff =
DockTornOff, Top = DockTop, Bottom = DockBottom, Right = DockRight,
Left = DockLeft, Minimized = DockMinimized }
enum DateFormat { TextDate, ISODate, LocalDate }
enum TimeSpec { LocalTime, UTC }
enum BackgroundMode { FixedColor, FixedPixmap, NoBackground,
PaletteForeground, PaletteButton, PaletteLight, PaletteMidlight,
PaletteDark, PaletteMid, PaletteText, PaletteBrightText,
PaletteBase, PaletteBackground, PaletteShadow, PaletteHighlight,
PaletteHighlightedText, PaletteButtonText, PaletteLink,
PaletteLinkVisited, X11ParentRelative }
enum StringComparisonMode { CaseSensitive = 0x00001, BeginsWith =
0x00002, EndsWith = 0x00004, Contains = 0x00008, ExactMatch =
0x00010 }
enum Corner { TopLeft = 0x00000, TopRight = 0x00001, BottomLeft =
0x00002, BottomRight = 0x00003 }
typedef void * HANDLE
β¨ DESCRIPTION β¨
okay bestie so Qt is a class that's basically a little namespace for all the random identifiers that need to be global-ish. it's the group chat everyone's in but nobody talks about π
Normally you can just ignore it entirely. like fr. QObject and a few other classes inherit from it, so all the identifiers living in the Qt namespace are usually just... usable, no qualification needed. no Qt:: prefix, no nothing. they just work. iconic.
BUT β and this is the plot twist π β every once in a while you gotta spell it out. so instead of just saying black, you say Qt::black. this hits you most often in static utility functions (think a bunch of class factories). so if your code is screaming at you about an ambiguous identifier, that's why. iykyk.
See also Miscellaneous Classes. π¦
π§ Member Type Documentation π§
π Qt::AlignmentFlags
this enum type describes alignment β¨ and it comes in two flavours: horizontal flags and vertical flags. buckle up.
the horizontal flags are:
Qt::AlignAutoβ aligns according to the language. left for most languages, right for Arabic and Hebrew. it's giving β¨culturally awareβ¨Qt::AlignLeftβ aligns with the left edge.Qt::AlignRightβ aligns with the right edge.Qt::AlignHCenterβ centers horizontally in the available space.Qt::AlignJustifyβ justifies the text in the available space. heads up though: this one does not work for everything and may be interpreted asAlignAutoin some cases. so, lowkey unreliable bestie, don't build your whole life on it.
the vertical flags are:
Qt::AlignTopβ aligns with the top.Qt::AlignBottomβ aligns with the bottom.Qt::AlignVCenterβ centers vertically in the available space.
ok so the rules, and you gotta listen:
- you can use only one of the horizontal flags at a time. pick one, we're not doing polyamory here.
- there's exactly one two-dimensional flag:
Qt::AlignCenterβ centers in both dimensions. - you can use at most one horizontal and one vertical flag at a time.
AlignCentercounts as both horizontal and vertical, so don't go adding more on top of it.
the masks:
Qt::AlignHorizontal_MaskQt::AlignVertical_Mask
π and listen β conflicting combinations of flags have undefined meanings. undefined. meaning the computer just makes up its own little reality. don't do it. fr fr.
πΈ Qt::AnchorAttribute
an anchor has one or more of the following attributes:
Qt::AnchorNameβ the name attribute of the anchor. this one is used when scrolling to an anchor in the document. it's the "take me there" attribute π«ΆQt::AnchorHrefβ the href attribute of the anchor. this one is used when a link is clicked, to determine what content to load. the "take me somewhere else" attribute β¨
π Qt::ArrowType
Qt::UpArrowQt::DownArrowQt::LeftArrowQt::RightArrow
(just four little arrows, no notes π )
π Qt::BGMode
Background mode:
Qt::TransparentModeQt::OpaqueMode
π Qt::BackgroundMode
this enum describes how the background of a widget changes, as the widget's palette changes. dramatic much?
so like, the background is what the widget contains when paintEvent() is called. and to minimize flicker, this should be the most common color or pixmap in the widget. makes sense β if you're gonna flash something on screen, at least make it the thing that's already mostly there.
ForPaletteBackground, usecolorGroup().brush( QColorGroup::Background ), and so on. π
the values:
Qt::PaletteForegroundQt::PaletteBackgroundQt::PaletteButtonQt::PaletteLightQt::PaletteMidlightQt::PaletteDarkQt::PaletteMidQt::PaletteTextQt::PaletteBrightTextQt::PaletteButtonTextQt::PaletteBaseQt::PaletteShadowQt::PaletteHighlightQt::PaletteHighlightedTextQt::PaletteLinkQt::PaletteLinkVisitedQt::X11ParentRelativeβ (internal use only) π stay out of there bestie, it's not for you
and the final three values have special meaning, so pay attention:
Qt::NoBackgroundβ the widget is not cleared beforepaintEvent(). but here's the tea: if the widget's paint event always draws on all the pixels, using this mode can be both fast and flicker-free. main character energy honestly.Qt::FixedColorβ the widget is cleared to a fixed color, normally different from all the ones in thepalette(). set usingsetPaletteBackgroundColor().Qt::FixedPixmapβ the widget is cleared to a fixed pixmap</pixmap>, normally different from all the ones in thepalette(). set usingsetPaletteBackgroundPixmap().
β οΈ okay soFixedColorandFixedPixmapare sometimes just right, but if you use them, make sure that you test your application when the desktop color scheme has been changed. like actually test it. (On X11, a quick way to test this is e.g../myapp -bg paleblue. On Windows, you must use the control panel.) don't skip this. this is the vibe check. π
See also QWidget::backgroundMode, QWidget::backgroundMode, QWidget::setBackgroundPixmap(), and QWidget::paletteBackgroundColor. π¦
π Qt::BrushStyle
Qt::NoBrushQt::SolidPatternQt::Dense1PatternQt::Dense2PatternQt::Dense3PatternQt::Dense4PatternQt::Dense5PatternQt::Dense6PatternQt::Dense7PatternQt::HorPatternQt::VerPatternQt::CrossPatternQt::BDiagPatternQt::FDiagPatternQt::DiagCrossPatternQt::CustomPattern
<center> [Image Omitted] </center>
(yes bestie there's literally supposed to be a picture of all the patterns here and it got omitted π we suffer together)
β Qt::ButtonState
this enum type describes the state of the mouse and the modifier buttons. so it's basically a little status report on what your hands are doing β¨
Qt::NoButtonβ used when the button state does not refer to any button (seeQMouseEvent::button()).Qt::LeftButtonβ set if the left button is pressed, or if this event refers to the left button. (The left button may be the right button on left-handed mice.) π«Ά inclusivity, we love to see itQt::RightButtonβ the right button.Qt::MidButtonβ the middle button. (yes, the scroll wheel one. it counts. it has feelings.)Qt::ShiftButtonβ a Shift key on the keyboard is also pressed.Qt::ControlButtonβ a Ctrl key on the keyboard is also pressed.Qt::AltButtonβ an Alt key on the keyboard is also pressed.Qt::MetaButtonβ a Meta key on the keyboard is also pressed.Qt::Keypadβ a keypad button is pressed.Qt::KeyButtonMaskβ a mask forShiftButton,ControlButton,AltButtonandMetaButton.Qt::MouseButtonMaskβ a mask forLeftButton,RightButtonandMidButton.
π¦ Qt::Corner
this enum type specifies a corner in a rectangle:
Qt::TopLeftβ top left cornerQt::TopRightβ top right cornerQt::BottomLeftβ bottom left cornerQt::BottomRightβ bottom right corner
(four corners, all accounted for, all slaying in their own quadrant π )
π Qt::CursorShape
this enum type defines the various cursors that can be used. the mouse pointer's whole wardrobe π
Qt::ArrowCursorβ standard arrow cursorQt::UpArrowCursorβ upwards arrowQt::CrossCursorβ crosshairQt::WaitCursorβ hourglass/watchQt::BusyCursorβ standard arrow with hourglass/watchQt::IbeamCursorβ ibeam/text entryQt::SizeVerCursorβ vertical resizeQt::SizeHorCursorβ horizontal resizeQt::SizeFDiagCursorβ diagonal resize (\)Qt::SizeBDiagCursorβ diagonal resize (/)Qt::SizeAllCursorβ all directions resizeQt::BlankCursorβ blank/invisible cursor (now you see me, now you literally don't π)Qt::SplitVCursorβ vertical splittingQt::SplitHCursorβ horizontal splittingQt::PointingHandCursorβ a pointing handQt::ForbiddenCursorβ a slashed circleQt::WhatsThisCursorβ an arrow with a question markQt::BitmapCursor
and the default for widgets in a normal state is ArrowCursor. no cap.
<center> [Image Omitted] </center>
(again π the cursor picture got omitted. we mourn.)
π Qt::DateFormat
Qt::TextDateβ (default) Qt formatQt::ISODateβ ISO 8601 extended format (YYYY-MM-DD, or with time,YYYY-MM-DDTHH:MM:SS)Qt::LocalDateβ locale dependent format
π§ Qt::Dock
each dock window can be in one of the following positions:
Qt::DockTopβ above the central widget, below the menu bar.Qt::DockBottomβ below the central widget, above the status bar.Qt::DockLeftβ to the left of the central widget.Qt::DockRightβ to the right of the central widget.Qt::DockMinimizedβ the dock window is not shown (this is effectively a 'hidden' dock area); the handles of all minimized dock windows are drawn in one row below the menu bar.Qt::DockTornOffβ the dock window floats as its own top level window which always stays on top of the main window. main character energy fr fr β¨Qt::DockUnmanagedβ not managed by aQMainWindow.
π Qt::GUIStyle
β οΈ This type is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. like, genuinely, don't. it's giving 2004. π
Qt::WindowsStyleQt::MotifStyleQt::MacStyleQt::Win3StyleQt::PMStyle
π Qt::ImageConversionFlags π
okay so this one is literally just a bitwise-OR situation, bestie. You OR together the flags you want. The ones marked "(default)" get set if you don't include any other values from the list (because the defaults are zero, cute right):
Color/Mono preference (ignored for QBitmap)
Qt::AutoColorβ (default) β if the image has depth 1 and contains only black and white pixels, the pixmap becomes monochrome.Qt::ColorOnlyβ the pixmap gets dithered/converted to the native display depth.Qt::MonoOnlyβ the pixmap becomes monochrome. And if it has to, it gets dithered using whichever dithering algorithm you chose.
Dithering mode preference for RGB channels
Qt::DiffuseDitherβ (default) β a high-quality dither. fancy.Qt::OrderedDitherβ a faster, more ordered dither.Qt::ThresholdDitherβ no dithering at all; closest color is used.
Dithering mode preference for alpha channel
Qt::ThresholdAlphaDitherβ (default) β no dithering.Qt::OrderedAlphaDitherβ a faster, more ordered dither.Qt::DiffuseAlphaDitherβ a high-quality dither.Qt::NoAlphaβ not supported. π«
Color matching versus dithering preference
Qt::PreferDitherβ (default when converting to a pixmap) β always dither 32-bit images when the image is converted to 8 bits.Qt::AvoidDitherβ (default when converting for the purpose of saving to file) β dither 32-bit images only if the image has more than 256 colors and it is being converted to 8 bits.Qt::AutoDitherβ not supported. π«
and now the plot twist: these next ones aren't values you use directly, they're masks for the classes above:
Qt::ColorMode_Maskβ mask for the color mode.Qt::Dither_Maskβ mask for the dithering mode for RGB channels.Qt::AlphaDither_Maskβ mask for the dithering mode for the alpha channel.Qt::DitherMode_Maskβ mask for the mode that determines the preference of color matching versus dithering.
πΈ pro tip: using 0 as the conversion flag sets all the default options. zero effort, zero problems, main character energy.
β¨οΈ Qt::Key β¨οΈ
these are the key names Qt uses, and yeah, it's a long list. sit down, get a snack, we're doing this. π
Qt::Key_EscapeQt::Key_TabQt::Key_BacktabQt::Key_BackspaceQt::Key_ReturnQt::Key_EnterQt::Key_InsertQt::Key_DeleteQt::Key_PauseQt::Key_PrintQt::Key_SysReqQt::Key_HomeQt::Key_EndQt::Key_LeftQt::Key_UpQt::Key_RightQt::Key_DownQt::Key_PriorQt::Key_NextQt::Key_ShiftQt::Key_ControlQt::Key_MetaQt::Key_AltQt::Key_CapsLockQt::Key_NumLockQt::Key_ScrollLockQt::Key_ClearQt::Key_F1Qt::Key_F2Qt::Key_F3Qt::Key_F4Qt::Key_F5Qt::Key_F6Qt::Key_F7Qt::Key_F8Qt::Key_F9Qt::Key_F10Qt::Key_F11Qt::Key_F12Qt::Key_F13Qt::Key_F14Qt::Key_F15Qt::Key_F16Qt::Key_F17Qt::Key_F18Qt::Key_F19Qt::Key_F20Qt::Key_F21Qt::Key_F22Qt::Key_F23Qt::Key_F24Qt::Key_F25Qt::Key_F26Qt::Key_F27Qt::Key_F28Qt::Key_F29Qt::Key_F30Qt::Key_F31Qt::Key_F32Qt::Key_F33Qt::Key_F34Qt::Key_F35(yes bestie, all the way to 35 π)Qt::Key_Super_LQt::Key_Super_RQt::Key_MenuQt::Key_Hyper_LQt::Key_Hyper_RQt::Key_HelpQt::Key_SpaceQt::Key_AnyQt::Key_ExclamQt::Key_QuoteDblQt::Key_NumberSignQt::Key_DollarQt::Key_PercentQt::Key_AmpersandQt::Key_ApostropheQt::Key_ParenLeftQt::Key_ParenRightQt::Key_AsteriskQt::Key_PlusQt::Key_CommaQt::Key_MinusQt::Key_PeriodQt::Key_SlashQt::Key_0Qt::Key_1Qt::Key_2Qt::Key_3Qt::Key_4Qt::Key_5Qt::Key_6Qt::Key_7Qt::Key_8Qt::Key_9Qt::Key_ColonQt::Key_SemicolonQt::Key_LessQt::Key_EqualQt::Key_GreaterQt::Key_QuestionQt::Key_AtQt::Key_AQt::Key_BQt::Key_CQt::Key_DQt::Key_EQt::Key_FQt::Key_GQt::Key_HQt::Key_IQt::Key_JQt::Key_KQt::Key_LQt::Key_MQt::Key_NQt::Key_OQt::Key_PQt::Key_QQt::Key_RQt::Key_SQt::Key_TQt::Key_UQt::Key_VQt::Key_WQt::Key_XQt::Key_YQt::Key_ZQt::Key_BracketLeftQt::Key_BackslashQt::Key_BracketRightQt::Key_AsciiCircumQt::Key_UnderscoreQt::Key_QuoteLeftQt::Key_BraceLeftQt::Key_BarQt::Key_BraceRightQt::Key_AsciiTilde
okay now we're into the lowercase latin-1 zone, don't be scared π¦
Qt::Key_nobreakspaceQt::Key_exclamdownQt::Key_centQt::Key_sterlingQt::Key_currencyQt::Key_yenQt::Key_brokenbarQt::Key_sectionQt::Key_diaeresisQt::Key_copyrightQt::Key_ordfeminineQt::Key_guillemotleftQt::Key_notsignQt::Key_hyphenQt::Key_registeredQt::Key_macronQt::Key_degreeQt::Key_plusminusQt::Key_twosuperiorQt::Key_threesuperiorQt::Key_acuteQt::Key_muQt::Key_paragraphQt::Key_periodcenteredQt::Key_cedillaQt::Key_onesuperiorQt::Key_masculineQt::Key_guillemotrightQt::Key_onequarterQt::Key_onehalfQt::Key_threequartersQt::Key_questiondownQt::Key_AgraveQt::Key_AacuteQt::Key_AcircumflexQt::Key_AtildeQt::Key_AdiaeresisQt::Key_AringQt::Key_AEQt::Key_CcedillaQt::Key_EgraveQt::Key_EacuteQt::Key_EcircumflexQt::Key_EdiaeresisQt::Key_IgraveQt::Key_IacuteQt::Key_IcircumflexQt::Key_IdiaeresisQt::Key_ETHQt::Key_NtildeQt::Key_OgraveQt::Key_OacuteQt::Key_OcircumflexQt::Key_OtildeQt::Key_OdiaeresisQt::Key_multiplyQt::Key_OobliqueQt::Key_UgraveQt::Key_UacuteQt::Key_UcircumflexQt::Key_UdiaeresisQt::Key_YacuteQt::Key_THORNQt::Key_ssharpQt::Key_agraveQt::Key_aacuteQt::Key_acircumflexQt::Key_atildeQt::Key_adiaeresisQt::Key_aringQt::Key_aeQt::Key_ccedillaQt::Key_egraveQt::Key_eacuteQt::Key_ecircumflexQt::Key_ediaeresisQt::Key_igraveQt::Key_iacuteQt::Key_icircumflexQt::Key_idiaeresisQt::Key_ethQt::Key_ntildeQt::Key_ograveQt::Key_oacuteQt::Key_ocircumflexQt::Key_otildeQt::Key_odiaeresisQt::Key_divisionQt::Key_oslashQt::Key_ugraveQt::Key_uacuteQt::Key_ucircumflexQt::Key_udiaeresisQt::Key_yacuteQt::Key_thornQt::Key_ydiaeresis
Multimedia keys π΅β¨
Qt::Key_BackQt::Key_ForwardQt::Key_StopQt::Key_RefreshQt::Key_VolumeDownQt::Key_VolumeMuteQt::Key_VolumeUpQt::Key_BassBoostQt::Key_BassUpQt::Key_BassDownQt::Key_TrebleUpQt::Key_TrebleDownQt::Key_MediaPlayQt::Key_MediaStopQt::Key_MediaPrevQt::Key_MediaNextQt::Key_MediaRecordQt::Key_HomePageQt::Key_FavoritesQt::Key_SearchQt::Key_StandbyQt::Key_OpenUrlQt::Key_LaunchMailQt::Key_LaunchMediaQt::Key_Launch0Qt::Key_Launch1Qt::Key_Launch2Qt::Key_Launch3Qt::Key_Launch4Qt::Key_Launch5Qt::Key_Launch6Qt::Key_Launch7Qt::Key_Launch8Qt::Key_Launch9Qt::Key_LaunchAQt::Key_LaunchBQt::Key_LaunchCQt::Key_LaunchDQt::Key_LaunchEQt::Key_LaunchFQt::Key_MediaLastQt::Key_unknownQt::Key_Direction_Lβ internal use only πQt::Key_Direction_Rβ internal use only π
π Qt::MacintoshVersion π
Qt::MV_Unknownβ version cannot be detected. mystery era. π΅οΈQt::MV_9β Mac OS 9Qt::MV_10_DOT_3β Mac OS X 10.3Qt::MV_10_DOT_2β Mac OS X 10.2Qt::MV_10_DOT_1β Mac OS X 10.1Qt::MV_10_DOT_0β Mac OS X 10.0Qt::MV_10_DOT_4β Mac OS X 10.4Qt::MV_CHEETAHβ 10.0 Codename πQt::MV_PUMAβ 10.1 Codename πββ¬Qt::MV_JAGUARβ 10.2 CodenameQt::MV_PANTHERβ 10.3 CodenameQt::MV_TIGERβ 10.4 Codename π―
ποΈ Qt::Modifier ποΈ
this enum type is describing the keyboard modifier keys Qt supports, periodt.
Qt::SHIFTβ the Shift keys, the ones on all standard keyboards.Qt::METAβ the Meta keys.Qt::CTRLβ the Ctrl keys.Qt::ALTβ the normal Alt keys, but not e.g. AltGr.Qt::MODIFIER_MASKβ a mask of Shift, Ctrl, Alt and Meta.Qt::UNICODE_ACCELβ the accelerator is specified as a Unicode code point, not as a Qt Key.
π§ Qt::Orientation π§
this type signifies an object's orientation. it's giving directions.
Qt::HorizontalQt::Vertical
orientation is used with QScrollBar, for example.
π Qt::PaintUnit π
Qt::PixelUnitQt::LoMetricUnitβ obsoleteQt::HiMetricUnitβ obsoleteQt::LoEnglishUnitβ obsoleteQt::HiEnglishUnitβ obsoleteQt::TwipsUnitβ obsolete
π so many obsoletes. they're still in the list though, so here they are, we don't gatekeep.
ποΈ Qt::PenCapStyle ποΈ
this enum type defines the pen cap styles Qt supports, i.e. the line end caps that can be drawn using QPainter.
Qt::FlatCapβ a square line end that does not cover the end point of the line.Qt::SquareCapβ a square line end that covers the end point and extends beyond it with half the line width.Qt::RoundCapβ a rounded line end.Qt::MPenCapStyleβ mask of the pen cap styles.
(there was a lil picture here, but it got omitted: [Image Omitted]) β¨
π Qt::PenJoinStyle π
this enum type defines the pen join styles Qt supports, i.e. which joins between two connected lines can be drawn using QPainter.
Qt::MiterJoinβ the outer edges of the lines are extended to meet at an angle, and this area is filled.Qt::BevelJoinβ the triangular notch between the two lines is filled.Qt::RoundJoinβ a circular arc between the two lines is filled.Qt::MPenJoinStyleβ mask of the pen join styles.
(another pic, also omitted: [Image Omitted]) π
βοΈ Qt::PenStyle βοΈ
this enum type defines the pen styles that can be drawn using QPainter. the styles are:
Qt::NoPenβ no line at all. for example,QPainter::drawRect()fills but does not draw any boundary line.Qt::SolidLineβ a simple line.Qt::DashLineβ dashes separated by a few pixels.Qt::DotLineβ dots separated by a few pixels.Qt::DashDotLineβ alternate dots and dashes.Qt::DashDotDotLineβ one dash, two dots, one dash, two dots.Qt::MPenStyleβ mask of the pen styles.
(one more image, you guessed it: [Image Omitted]) π
π¨ Qt::RasterOp π¨
okay so bestie, this enum type is literally the blueprint for how things get written to the paint device. Every bit of the src (that's what you write) interacts with the corresponding bit of the dst pixel. it's giving bitwise romance, fr fr. π
Qt::CopyROPβdst = srcQt::OrROPβdst = src OR dstQt::XorROPβdst = src XOR dstQt::NotAndROPβdst = (NOT src) AND dstQt::EraseROPβ an alias forNotAndROPQt::NotCopyROPβdst = NOT srcQt::NotOrROPβdst = (NOT src) OR dstQt::NotXorROPβdst = (NOT src) XOR dstQt::AndROPβdst = src AND dstQt::NotEraseROPβ an alias forAndROPQt::NotROPβdst = NOT dstQt::ClearROPβdst = 0Qt::SetROPβdst = 1Qt::NopROPβdst = dstQt::AndNotROPβdst = src AND (NOT dst)Qt::OrNotROPβdst = src OR (NOT dst)Qt::NandROPβdst = NOT (src AND dst)Qt::NorROPβdst = NOT (src OR dst)
By far the most useful ones are CopyROP and XorROP. no cap.
On Qt/Embedded, onlyCopyROP,XorROP, andNotROPare supported. π
π¦ Qt::SequenceMatch π¦
vibe check on sequences: do they match or not? π
Qt::NoMatchβ Sequences have nothing in commonQt::PartialMatchβ Sequences match partially, but are not completeQt::Identicalβ Sequences do not differ
π’ Qt::SortOrder π’
This enum describes how the items in a widget are sorted. lowkey straightforward, highkey useful. β¨
Qt::Ascendingβ The items are sorted ascending e.g. starts with'AAA'ends with'ZZZ'in Latin-1 localesQt::Descendingβ The items are sorted descending e.g. starts with'ZZZ'ends with'AAA'in Latin-1 locales
π Qt::StringComparisonMode π
This enum type is used to set the string comparison mode when searching for an item. It is used by QListBox, QListView and QIconView, for example. We'll refer to the string being searched as the 'target' string. iykyk. π«Ά
Qt::CaseSensitiveβ The strings must match case sensitively.Qt::ExactMatchβ The target and search strings must match exactly.Qt::BeginsWithβ The target string begins with the search string.Qt::EndsWithβ The target string ends with the search string.Qt::Containsβ The target string contains the search string.
If you OR these flags together (excluding CaseSensitive), the search criteria get applied in the following order: ExactMatch, BeginsWith, EndsWith, Contains.
Matching is case-insensitive unless CaseSensitive is set. CaseSensitive can be OR-ed with any combination of the other flags.
π Qt::TextFlags π
This enum type is used to define some modifier flags. Some of these flags only make sense in the context of printing: π
Qt::SingleLineβ Treats all whitespace as spaces and prints just one line.Qt::DontClipβ If it's impossible to stay within the given bounds, it prints outside.Qt::ExpandTabsβ Makes theU+0009(ASCII tab) character move to the next tab stop.Qt::ShowPrefixβ Displays the string"&P"as<u>P</u>(seeQButtonfor an example). For an ampersand, use"&&".Qt::WordBreakβ Breaks lines at appropriate points, e.g. at word boundaries.Qt::BreakAnywhereβ Breaks lines anywhere, even within words.Qt::NoAccelβ Same asShowPrefixbut doesn't draw the underlines.
You can use as many modifier flags as you want, except that SingleLine and WordBreak cannot be combined.
Flags that are inappropriate for a given use (e.g. ShowPrefix to QGridLayout::addWidget()) are generally ignored.
π¬ Qt::TextFormat π¬
This enum is used in widgets that can display both plain text and rich text, e.g. QLabel. It is used for deciding whether a text string should be interpreted as one or the other. This is normally done by passing one of the enum values to a setTextFormat() function. the duality is real. π¬
Qt::PlainTextβ The text string is interpreted as a plain text string.Qt::RichTextβ The text string is interpreted as a rich text string using the currentQStyleSheet::defaultSheet().Qt::AutoTextβ The text string is interpreted as forRichTextifQStyleSheet::mightBeRichText()returnsTRUE, otherwise asPlainText.Qt::LogTextβ A special, limited text format which is only used byQTextEditin an optimized mode.
β° Qt::TimeSpec β°
timezone bestie moment β°
Qt::LocalTimeβ Locale dependent time (Timezones and Daylight Savings Time)Qt::UTCβ Coordinated Universal Time, replaces Greenwich Time
β¨ Qt::UIEffect β¨
these are the UI effects, and honestly the last one is just Reserved, periodt. β¨
Qt::UI_GeneralQt::UI_AnimateMenuQt::UI_FadeMenuQt::UI_AnimateComboQt::UI_AnimateTooltipQt::UI_FadeTooltipQt::UI_AnimateToolBoxβ Reserved
β¨ Qt::WidgetFlags β¨
okay bestie this one's a whole thing β this enum type is used to specify various window-system properties for the widget πͺ. They're fairly unusual but necessary in a few cases. Some of these flags depend on whether the underlying window manager supports them. (See the toplevel example for an explanation and example of their use.) π
The main types are:
Qt::WType_TopLevelβ indicates that this widget is a top-level widget, usually with a window-system frame and so on.Qt::WType_Dialogβ indicates that this widget is a top-level window that should be decorated as a dialog (i.e. typically no maximize or minimize buttons in the title bar). If you want to use it as a modal dialog it should be launched from another window, or have a parent and this flag should be combined withWShowModal. If you make it modal, the dialog will prevent other top-level windows in the application from getting any input.WType_DialogimpliesWType_TopLevel. We refer to a top-level window that has a parent as a secondary window. (See alsoWGroupLeader.)Qt::WType_Popupβ indicates that this widget is a popup top-level window, i.e. that it is modal, but has a window system frame appropriate for popup menus.WType_PopupimpliesWType_TopLevel.Qt::WType_Desktopβ indicates that this widget is the desktop. See alsoWPaintDesktopbelow.WType_DesktopimpliesWType_TopLevel.
There are also a number of flags which you can use to customize the appearance of top-level windows. These have no effect on other windows:
Qt::WStyle_Customizeβ indicates that theWStyle_*flags should be used to build the window instead of the default flags.Qt::WStyle_NormalBorderβ gives the window a normal border. This cannot be combined withWStyle_DialogBorderorWStyle_NoBorder.Qt::WStyle_DialogBorderβ gives the window a thin dialog border. This cannot be combined withWStyle_NormalBorderorWStyle_NoBorder.Qt::WStyle_NoBorderβ produces a borderless window. Note that the user cannot move or resize a borderless window via the window system. This cannot be combined withWStyle_NormalBorderorWStyle_DialogBorder. On Windows, the flag works fine. On X11, the result of the flag is dependent on the window manager and its ability to understand MOTIF and/or NETWM hints: most existing modern window managers can handle this. WithWX11BypassWM, you can bypass the window manager completely. This results in a borderless window that is not managed at all (i.e. no keyboard input unless you callsetActiveWindow()manually).
fr fr that last one is a whole situation β unmanaged window means nobody is giving it keyboard focus unless you do it yourself π
Qt::WStyle_NoBorderExβ this value is obsolete. It has the same effect as usingWStyle_NoBorder.Qt::WStyle_Titleβ gives the window a title bar.Qt::WStyle_SysMenuβ adds a window system menu.Qt::WStyle_Minimizeβ adds a minimize button. Note that on Windows this has to be combined withWStyle_SysMenufor it to work.Qt::WStyle_Maximizeβ adds a maximize button. Note that on Windows this has to be combined withWStyle_SysMenufor it to work.Qt::WStyle_MinMaxβ is equal toWStyle_Minimize|WStyle_Maximize. Note that on Windows this has to be combined withWStyle_SysMenuto work.Qt::WStyle_ContextHelpβ adds a context help button to dialogs.Qt::WStyle_Toolβ makes the window a tool window. A tool window is often a small window with a smaller than usual title bar and decoration, typically used for collections of tool buttons. It there is a parent, the tool window will always be kept on top of it. If there isn't a parent, you may consider passingWStyle_StaysOnTopas well. If the window system supports it, a tool window can be decorated with a somewhat lighter frame. It can also be combined withWStyle_NoBorder.Qt::WStyle_StaysOnTopβ informs the window system that the window should stay on top of all other windows. Note that on some window managers on X11 you also have to passWX11BypassWMfor this flag to work correctly.Qt::WStyle_Dialogβ indicates that the window is a logical subwindow of its parent (i.e. a dialog). The window will not get its own taskbar entry and will be kept on top of its parent by the window system. Usually it will also be minimized when the parent is minimized. If not customized, the window is decorated with a slightly simpler title bar. This is the flagQDialoguses.Qt::WStyle_Splashβ indicates that the window is a splash screen. On X11, we try to follow NETWM standard for a splash screen window if the window manager supports is otherwise it is equivalent toWX11BypassWM. On other platforms, it is equivalent toWStyle_NoBorder | WMacNoSheet | WStyle_Tool | WWinOwnDC.
π Modifier flags π
Qt::WDestructiveCloseβ makes Qt delete this widget when the widget has acceptedcloseEvent(), or when the widget tried to ignorecloseEvent()but could not.Qt::WPaintDesktopβ gives this widget paint events for the desktop.Qt::WPaintUnclippedβ makes all painters operating on this widget unclipped. Children of this widget or other widgets in front of it do not clip the area the painter can paint on.Qt::WPaintCleverβ indicates that Qt should not try to optimize repainting for the widget, but instead pass on window system repaint events directly. (This tends to produce more events and smaller repaint regions.)Qt::WMouseNoMaskβ indicates that even if the widget has a mask, it wants mouse events for its entire rectangle.Qt::WStaticContentsβ indicates that the widget contents are north-west aligned and static. On resize, such a widget will receive paint events only for the newly visible part of itself.Qt::WNoAutoEraseβ indicates that the widget paints all its pixels. Updating, resizing, scrolling and focus changes should therefore not erase the widget. This allows smart-repainting to avoid flicker.Qt::WResizeNoEraseβ this value is obsolete; useWNoAutoEraseinstead.Qt::WRepaintNoEraseβ this value is obsolete; useWNoAutoEraseinstead.Qt::WGroupLeaderβ makes this window a group leader. A group leader should not have a parent (i.e. it should be a top-level window). Any decendant windows (direct or indirect) of a group leader are in its group; other windows are not. If you show a secondary window from the group (i.e. show a window whose top-most parent is a group leader), that window will be modal with respect to the other windows in the group, but modeless with respect to windows in other groups.
π Miscellaneous flags π
Qt::WShowModalβ seeWType_Dialog
π§ Internal flags π§
Qt::WNoMousePropagationQt::WStaticContentsQt::WStyle_ReservedQt::WSubWindowQt::WType_ModalQt::WWinOwnDCQt::WX11BypassWMQt::WMacNoSheetQt::WMacDrawerQt::WStyle_MaskQt::WType_Mask
π Qt::WidgetState π
Internal flags. no thoughts, just vibes π«Ά
Qt::WState_CreatedQt::WState_DisabledQt::WState_VisibleQt::WState_ForceHideQt::WState_OwnCursorQt::WState_MouseTrackingQt::WState_CompressKeysQt::WState_BlockUpdatesQt::WState_InPaintEventQt::WState_ReparentedQt::WState_ConfigPendingQt::WState_ResizedQt::WState_AutoMaskQt::WState_PolishedQt::WState_DNDQt::WState_Reserved0β internalQt::WState_CreatedHiddenQt::WState_MaximizedQt::WState_MinimizedQt::WState_ForceDisabledQt::WState_ExposedQt::WState_HasMouseQt::WState_CreatedHiddenQt::WState_OwnSizePolicyQt::WState_FullScreen
bestie yes WState_CreatedHidden really does show up twice in that list, I'm not gaslighting you π
π¦ Qt::WindowState π¦
This enum type is used to specify the current state of a top-level window.
The states are:
Qt::WindowNoStateβ The window has no state set (in normal state).Qt::WindowMinimizedβ The window is minimized (i.e. iconified).Qt::WindowMaximizedβ The window is maximized with a frame around it.Qt::WindowFullScreenβ The window fills the entire screen without any frame around it.Qt::WindowActiveβ The window is the active window, i.e. it has keyboard focus.
πΈ Qt::WindowsVersion πΈ
Qt::WV_32sβ Windows 3.1 with Win 32sQt::WV_95β Windows 95Qt::WV_98β Windows 98Qt::WV_Meβ Windows MeQt::WV_DOS_basedQt::WV_NTβ Windows NTQt::WV_2000β Windows 2000Qt::WV_XPβ Windows XPQt::WV_2003β Windows Server 2003Qt::WV_NT_basedQt::WV_VISTAβ Windows VistaQt::WV_CEβ Windows CEQt::WV_CENETβ Windows CE .NETQt::WV_CE_based
π₯ SEE ALSO π₯
http://doc.trolltech.com/qt.html http://www.trolltech.com/faq/tech.html
π COPYRIGHT π
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.
β¨ AUTHOR β¨
Generated automatically from the source code.
π BUGS π
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you.
The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech.
If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qt.3qt) and the Qt version (3.3.8).
and that's a wrap on the whole page, bestie!! π this little artifact was cooked up by Trolltech AS, dated 2 February 2007, and it lives under the name Qt(3qt) β go forth and flag responsibly πβ¨
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms