Struct qt_core::WidgetAttribute
source · pub struct WidgetAttribute(/* private fields */);
Expand description
This enum type is used to specify various widget attributes. Attributes are set and cleared with QWidget::setAttribute(), and queried with QWidget::testAttribute(), although some have special convenience functions which are mentioned below.
C++ enum: Qt::WidgetAttribute
.
This enum type is used to specify various widget attributes. Attributes are set and cleared with QWidget::setAttribute(), and queried with QWidget::testAttribute(), although some have special convenience functions which are mentioned below.
Implementations§
source§impl WidgetAttribute
impl WidgetAttribute
sourcepub const WADisabled: WidgetAttribute = _
pub const WADisabled: WidgetAttribute = _
Indicates that the widget is disabled, i.e. it does not receive any mouse or keyboard events. There is also a getter functions QWidget::isEnabled(). This is set/cleared by the Qt kernel. (C++ enum variant: WA_Disabled = 0
)
sourcepub const WAUnderMouse: WidgetAttribute = _
pub const WAUnderMouse: WidgetAttribute = _
Indicates that the widget is under the mouse cursor. The value is not updated correctly during drag and drop operations. There is also a getter function, QWidget::underMouse(). This flag is set or cleared by the Qt kernel. (C++ enum variant: WA_UnderMouse = 1
)
sourcepub const WAMouseTracking: WidgetAttribute = _
pub const WAMouseTracking: WidgetAttribute = _
Indicates that the widget has mouse tracking enabled. See QWidget::mouseTracking. (C++ enum variant: WA_MouseTracking = 2
)
sourcepub const WAContentsPropagated: WidgetAttribute = _
pub const WAContentsPropagated: WidgetAttribute = _
This flag is superfluous and obsolete; it no longer has any effect. Since Qt 4.1, all widgets that do not set WA_PaintOnScreen propagate their contents. (C++ enum variant: WA_ContentsPropagated = 3
)
sourcepub const WAOpaquePaintEvent: WidgetAttribute = _
pub const WAOpaquePaintEvent: WidgetAttribute = _
Indicates that the widget paints all its pixels when it receives a paint event. Thus, 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 by helping to reduce flicker on systems that do not support double buffering and avoiding computational cycles necessary to erase the background prior to painting. Note: Unlike WA_NoSystemBackground, WA_OpaquePaintEvent makes an effort to avoid transparent window backgrounds. This flag is set or cleared by the widget’s author. (C++ enum variant: WA_OpaquePaintEvent = 4
)
sourcepub const WANoBackground: WidgetAttribute = _
pub const WANoBackground: WidgetAttribute = _
This value is obsolete. Use WA_OpaquePaintEvent instead. (C++ enum variant: WA_NoBackground = 4
)
sourcepub const WAStaticContents: WidgetAttribute = _
pub const WAStaticContents: WidgetAttribute = _
Indicates that the widget contents are north-west aligned and static. On resize, such a widget will receive paint events only for parts of itself that are newly visible. This flag is set or cleared by the widget’s author. (C++ enum variant: WA_StaticContents = 5
)
sourcepub const WALaidOut: WidgetAttribute = _
pub const WALaidOut: WidgetAttribute = _
C++ enum variant: WA_LaidOut = 7
sourcepub const WAPaintOnScreen: WidgetAttribute = _
pub const WAPaintOnScreen: WidgetAttribute = _
Indicates that the widget wants to draw directly onto the screen. Widgets with this attribute set do not participate in composition management, i.e. they cannot be semi-transparent or shine through semi-transparent overlapping widgets. Note: This flag is only supported on X11 and it disables double buffering. On Qt for Embedded Linux, the flag only works when set on a top-level widget and it relies on support from the active screen driver. This flag is set or cleared by the widget’s author. To render outside of Qt’s paint system, e.g., if you require native painting primitives, you need to reimplement QWidget::paintEngine() to return 0 and set this flag. (C++ enum variant: WA_PaintOnScreen = 8
)
sourcepub const WANoSystemBackground: WidgetAttribute = _
pub const WANoSystemBackground: WidgetAttribute = _
Indicates that the widget has no background, i.e. when the widget receives paint events, the background is not automatically repainted. Note: Unlike WA_OpaquePaintEvent, newly exposed areas are never filled with the background (e.g., after showing a window for the first time the user can see “through” it until the application processes the paint events). This flag is set or cleared by the widget’s author. (C++ enum variant: WA_NoSystemBackground = 9
)
sourcepub const WAUpdatesDisabled: WidgetAttribute = _
pub const WAUpdatesDisabled: WidgetAttribute = _
Indicates that updates are blocked (including the system background). This flag is set or cleared by the Qt kernel. Warning: This flag must never be set or cleared by the widget’s author. (C++ enum variant: WA_UpdatesDisabled = 10
)
sourcepub const WAMapped: WidgetAttribute = _
pub const WAMapped: WidgetAttribute = _
Indicates that the widget is mapped on screen. This is set/cleared by the Qt kernel. (C++ enum variant: WA_Mapped = 11
)
sourcepub const WAMacNoClickThrough: WidgetAttribute = _
pub const WAMacNoClickThrough: WidgetAttribute = _
When a widget that has this attribute set is clicked, and its window is inactive, the click will make the window active but won’t be seen by the widget. Typical use of this attribute is on widgets with “destructive” actions, such as a “Delete” button. WA_MacNoClickThrough also applies to all child widgets of the widget that has it set. (C++ enum variant: WA_MacNoClickThrough = 12
)
sourcepub const WAInputMethodEnabled: WidgetAttribute = _
pub const WAInputMethodEnabled: WidgetAttribute = _
Enables input methods for Asian languages. Must be set when creating custom text editing widgets. (C++ enum variant: WA_InputMethodEnabled = 14
)
sourcepub const WAWStateVisible: WidgetAttribute = _
pub const WAWStateVisible: WidgetAttribute = _
C++ enum variant: WA_WState_Visible = 15
sourcepub const WAWStateHidden: WidgetAttribute = _
pub const WAWStateHidden: WidgetAttribute = _
C++ enum variant: WA_WState_Hidden = 16
sourcepub const WAForceDisabled: WidgetAttribute = _
pub const WAForceDisabled: WidgetAttribute = _
Indicates that the widget is explicitly disabled, i.e. it will remain disabled even when all its ancestors are set to the enabled state. This implies WA_Disabled. This is set/cleared by QWidget::setEnabled() and QWidget::setDisabled(). (C++ enum variant: WA_ForceDisabled = 32
)
sourcepub const WAKeyCompression: WidgetAttribute = _
pub const WAKeyCompression: WidgetAttribute = _
Enables key event compression if set, and disables it if not set. By default key compression is off, so widgets receive one key press event for each key press (or more, since autorepeat is usually on). If you turn it on and your program doesn’t keep up with key input, Qt may try to compress key events so that more than one character can be processed in each event. For example, a word processor widget might receive 2, 3 or more characters in each QKeyEvent::text(), if the layout recalculation takes too long for the CPU. If a widget supports multiple character unicode input, it is always safe to turn the compression on. Qt performs key event compression only for printable characters. Qt::Modifier keys, cursor movement keys, function keys and miscellaneous action keys (e.g. Escape, Enter, Backspace, PrintScreen) will stop key event compression, even if there are more compressible key events available. Platforms other than Mac and X11 do not support this compression, in which case turning it on will have no effect. This is set/cleared by the widget’s author. (C++ enum variant: WA_KeyCompression = 33
)
sourcepub const WAPendingMoveEvent: WidgetAttribute = _
pub const WAPendingMoveEvent: WidgetAttribute = _
Indicates that a move event is pending, e.g., when a hidden widget was moved. This flag is set or cleared by the Qt kernel. (C++ enum variant: WA_PendingMoveEvent = 34
)
sourcepub const WAPendingResizeEvent: WidgetAttribute = _
pub const WAPendingResizeEvent: WidgetAttribute = _
Indicates that a resize event is pending, e.g., when a hidden widget was resized. This flag is set or cleared by the Qt kernel. (C++ enum variant: WA_PendingResizeEvent = 35
)
sourcepub const WASetPalette: WidgetAttribute = _
pub const WASetPalette: WidgetAttribute = _
Indicates that the widget has a palette of its own. This flag is set or cleared by QWidget::setPalette(). (C++ enum variant: WA_SetPalette = 36
)
sourcepub const WASetFont: WidgetAttribute = _
pub const WASetFont: WidgetAttribute = _
Indicates that the widget has a font of its own. This flag is set or cleared by QWidget::setFont(). (C++ enum variant: WA_SetFont = 37
)
sourcepub const WASetCursor: WidgetAttribute = _
pub const WASetCursor: WidgetAttribute = _
Indicates that the widget has a cursor of its own. This flag is set or cleared by QWidget::setCursor() and QWidget::unsetCursor(). (C++ enum variant: WA_SetCursor = 38
)
sourcepub const WANoChildEventsFromChildren: WidgetAttribute = _
pub const WANoChildEventsFromChildren: WidgetAttribute = _
Indicates that the widget does not want to receive ChildAdded or ChildRemoved events sent from its children. This is set by a widget’s author. (C++ enum variant: WA_NoChildEventsFromChildren = 39
)
sourcepub const WAWindowModified: WidgetAttribute = _
pub const WAWindowModified: WidgetAttribute = _
Indicates that the window is marked as modified. On some platforms this flag will do nothing, on others (including macOS and Windows) the window will take a modified appearance. This flag is set or cleared by QWidget::setWindowModified(). (C++ enum variant: WA_WindowModified = 41
)
sourcepub const WAResized: WidgetAttribute = _
pub const WAResized: WidgetAttribute = _
Indicates that the widget has an explicit size. This flag is set or cleared by QWidget::resize() and QWidget::setGeometry(). (C++ enum variant: WA_Resized = 42
)
sourcepub const WAMoved: WidgetAttribute = _
pub const WAMoved: WidgetAttribute = _
Indicates that the widget has an explicit position. This is set/cleared by QWidget::move() and by QWidget::setGeometry(). (C++ enum variant: WA_Moved = 43
)
sourcepub const WAPendingUpdate: WidgetAttribute = _
pub const WAPendingUpdate: WidgetAttribute = _
C++ enum variant: WA_PendingUpdate = 44
sourcepub const WAInvalidSize: WidgetAttribute = _
pub const WAInvalidSize: WidgetAttribute = _
C++ enum variant: WA_InvalidSize = 45
sourcepub const WAMacBrushedMetal: WidgetAttribute = _
pub const WAMacBrushedMetal: WidgetAttribute = _
Indicates the widget should be drawn in the brushed metal style as supported by the windowing system. This attribute is only applicable to macOS. (C++ enum variant: WA_MacBrushedMetal = 46
)
sourcepub const WAMacMetalStyle: WidgetAttribute = _
pub const WAMacMetalStyle: WidgetAttribute = _
C++ enum variant: WA_MacMetalStyle = 46
sourcepub const WACustomWhatsThis: WidgetAttribute = _
pub const WACustomWhatsThis: WidgetAttribute = _
Indicates that the widget wants to continue operating normally in “What’s This?” mode. This is set by the widget’s author. (C++ enum variant: WA_CustomWhatsThis = 47
)
sourcepub const WALayoutOnEntireRect: WidgetAttribute = _
pub const WALayoutOnEntireRect: WidgetAttribute = _
Indicates that the widget wants QLayout to operate on the entire QWidget::rect(), not only on QWidget::contentsRect(). This is set by the widget’s author. (C++ enum variant: WA_LayoutOnEntireRect = 48
)
sourcepub const WAOutsideWSRange: WidgetAttribute = _
pub const WAOutsideWSRange: WidgetAttribute = _
Indicates that the widget is outside the valid range of the window system’s coordinate system. A widget outside the valid range cannot be mapped on screen. This is set/cleared by the Qt kernel. (C++ enum variant: WA_OutsideWSRange = 49
)
sourcepub const WAGrabbedShortcut: WidgetAttribute = _
pub const WAGrabbedShortcut: WidgetAttribute = _
C++ enum variant: WA_GrabbedShortcut = 50
sourcepub const WATransparentForMouseEvents: WidgetAttribute = _
pub const WATransparentForMouseEvents: WidgetAttribute = _
When enabled, this attribute disables the delivery of mouse events to the widget and its children. Mouse events are delivered to other widgets as if the widget and its children were not present in the widget hierarchy; mouse clicks and other events effectively “pass through” them. This attribute is disabled by default. (C++ enum variant: WA_TransparentForMouseEvents = 51
)
sourcepub const WAPaintUnclipped: WidgetAttribute = _
pub const WAPaintUnclipped: WidgetAttribute = _
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. 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. (C++ enum variant: WA_PaintUnclipped = 52
)
sourcepub const WASetWindowIcon: WidgetAttribute = _
pub const WASetWindowIcon: WidgetAttribute = _
C++ enum variant: WA_SetWindowIcon = 53
sourcepub const WANoMouseReplay: WidgetAttribute = _
pub const WANoMouseReplay: WidgetAttribute = _
Used for pop-up widgets. Indicates that the most recent mouse press event should not be replayed when the pop-up widget closes. The flag is set by the widget’s author and cleared by the Qt kernel every time the widget receives a new mouse event. (C++ enum variant: WA_NoMouseReplay = 54
)
sourcepub const WADeleteOnClose: WidgetAttribute = _
pub const WADeleteOnClose: WidgetAttribute = _
Makes Qt delete this widget when the widget has accepted the close event (see QWidget::closeEvent()). (C++ enum variant: WA_DeleteOnClose = 55
)
sourcepub const WARightToLeft: WidgetAttribute = _
pub const WARightToLeft: WidgetAttribute = _
Indicates that the layout direction for the widget is right to left. (C++ enum variant: WA_RightToLeft = 56
)
sourcepub const WASetLayoutDirection: WidgetAttribute = _
pub const WASetLayoutDirection: WidgetAttribute = _
C++ enum variant: WA_SetLayoutDirection = 57
sourcepub const WANoChildEventsForParent: WidgetAttribute = _
pub const WANoChildEventsForParent: WidgetAttribute = _
Indicates that the widget does not want ChildAdded or ChildRemoved events sent to its parent. This is rarely necessary but can help to avoid automatic insertion widgets like splitters and layouts. This is set by a widget’s author. (C++ enum variant: WA_NoChildEventsForParent = 58
)
sourcepub const WAForceUpdatesDisabled: WidgetAttribute = _
pub const WAForceUpdatesDisabled: WidgetAttribute = _
Indicates that updates are explicitly disabled for the widget; i.e. it will remain disabled even when all its ancestors are set to the updates-enabled state. This implies WA_UpdatesDisabled. This is set/cleared by QWidget::setUpdatesEnabled(). (C++ enum variant: WA_ForceUpdatesDisabled = 59
)
sourcepub const WAWStateCreated: WidgetAttribute = _
pub const WAWStateCreated: WidgetAttribute = _
C++ enum variant: WA_WState_Created = 60
sourcepub const WAWStateCompressKeys: WidgetAttribute = _
pub const WAWStateCompressKeys: WidgetAttribute = _
C++ enum variant: WA_WState_CompressKeys = 61
sourcepub const WAWStateInPaintEvent: WidgetAttribute = _
pub const WAWStateInPaintEvent: WidgetAttribute = _
C++ enum variant: WA_WState_InPaintEvent = 62
sourcepub const WAWStateReparented: WidgetAttribute = _
pub const WAWStateReparented: WidgetAttribute = _
C++ enum variant: WA_WState_Reparented = 63
sourcepub const WAWStateConfigPending: WidgetAttribute = _
pub const WAWStateConfigPending: WidgetAttribute = _
C++ enum variant: WA_WState_ConfigPending = 64
sourcepub const WAWStatePolished: WidgetAttribute = _
pub const WAWStatePolished: WidgetAttribute = _
C++ enum variant: WA_WState_Polished = 66
sourcepub const WAWStateDND: WidgetAttribute = _
pub const WAWStateDND: WidgetAttribute = _
C++ enum variant: WA_WState_DND = 67
sourcepub const WAWStateOwnSizePolicy: WidgetAttribute = _
pub const WAWStateOwnSizePolicy: WidgetAttribute = _
C++ enum variant: WA_WState_OwnSizePolicy = 68
sourcepub const WAWStateExplicitShowHide: WidgetAttribute = _
pub const WAWStateExplicitShowHide: WidgetAttribute = _
C++ enum variant: WA_WState_ExplicitShowHide = 69
sourcepub const WAShowModal: WidgetAttribute = _
pub const WAShowModal: WidgetAttribute = _
This attribute has been deprecated. Use QWidget::windowModality instead. (C++ enum variant: WA_ShowModal = 70
)
sourcepub const WAMouseNoMask: WidgetAttribute = _
pub const WAMouseNoMask: WidgetAttribute = _
Makes the widget receive mouse events for the entire widget regardless of the currently set mask, overriding QWidget::setMask(). This is not applicable for top-level windows. (C++ enum variant: WA_MouseNoMask = 71
)
sourcepub const WAGroupLeader: WidgetAttribute = _
pub const WAGroupLeader: WidgetAttribute = _
This attribute has been deprecated. Use QWidget::windowModality instead. (C++ enum variant: WA_GroupLeader = 72
)
sourcepub const WANoMousePropagation: WidgetAttribute = _
pub const WANoMousePropagation: WidgetAttribute = _
Prohibits mouse events from being propagated to the widget’s parent. This attribute is disabled by default. (C++ enum variant: WA_NoMousePropagation = 73
)
sourcepub const WAHover: WidgetAttribute = _
pub const WAHover: WidgetAttribute = _
Forces Qt to generate paint events when the mouse enters or leaves the widget. This feature is typically used when implementing custom styles; see the Styles example for details. (C++ enum variant: WA_Hover = 74
)
sourcepub const WAInputMethodTransparent: WidgetAttribute = _
pub const WAInputMethodTransparent: WidgetAttribute = _
C++ enum variant: WA_InputMethodTransparent = 75
sourcepub const WAQuitOnClose: WidgetAttribute = _
pub const WAQuitOnClose: WidgetAttribute = _
Makes Qt quit the application when the last widget with the attribute set has accepted closeEvent(). This behavior can be modified with the QApplication::quitOnLastWindowClosed property. By default this attribute is set for all widgets of type Qt::Window. (C++ enum variant: WA_QuitOnClose = 76
)
sourcepub const WAKeyboardFocusChange: WidgetAttribute = _
pub const WAKeyboardFocusChange: WidgetAttribute = _
Set on a toplevel window when the users changes focus with the keyboard (tab, backtab, or shortcut). (C++ enum variant: WA_KeyboardFocusChange = 77
)
sourcepub const WAAcceptDrops: WidgetAttribute = _
pub const WAAcceptDrops: WidgetAttribute = _
Allows data from drag and drop operations to be dropped onto the widget (see QWidget::setAcceptDrops()). (C++ enum variant: WA_AcceptDrops = 78
)
sourcepub const WADropSiteRegistered: WidgetAttribute = _
pub const WADropSiteRegistered: WidgetAttribute = _
C++ enum variant: WA_DropSiteRegistered = 79
sourcepub const WAForceAcceptDrops: WidgetAttribute = _
pub const WAForceAcceptDrops: WidgetAttribute = _
C++ enum variant: WA_ForceAcceptDrops = 79
sourcepub const WAWindowPropagation: WidgetAttribute = _
pub const WAWindowPropagation: WidgetAttribute = _
Makes a toplevel window inherit font, palette and locale from its parent. (C++ enum variant: WA_WindowPropagation = 80
)
sourcepub const WANoX11EventCompression: WidgetAttribute = _
pub const WANoX11EventCompression: WidgetAttribute = _
C++ enum variant: WA_NoX11EventCompression = 81
sourcepub const WATintedBackground: WidgetAttribute = _
pub const WATintedBackground: WidgetAttribute = _
C++ enum variant: WA_TintedBackground = 82
sourcepub const WAX11OpenGLOverlay: WidgetAttribute = _
pub const WAX11OpenGLOverlay: WidgetAttribute = _
C++ enum variant: WA_X11OpenGLOverlay = 83
sourcepub const WAAlwaysShowToolTips: WidgetAttribute = _
pub const WAAlwaysShowToolTips: WidgetAttribute = _
Enables tooltips for inactive windows. (C++ enum variant: WA_AlwaysShowToolTips = 84
)
sourcepub const WAMacOpaqueSizeGrip: WidgetAttribute = _
pub const WAMacOpaqueSizeGrip: WidgetAttribute = _
Indicates that the native Carbon size grip should be opaque instead of transparent (the default). This attribute is only applicable to macOS and is set by the widget’s author. (C++ enum variant: WA_MacOpaqueSizeGrip = 85
)
sourcepub const WASetStyle: WidgetAttribute = _
pub const WASetStyle: WidgetAttribute = _
Indicates that the widget has a style of its own. This flag is set or cleared by QWidget::setStyle(). (C++ enum variant: WA_SetStyle = 86
)
sourcepub const WASetLocale: WidgetAttribute = _
pub const WASetLocale: WidgetAttribute = _
Indicates the locale should be taken into consideration in the widget. (C++ enum variant: WA_SetLocale = 87
)
sourcepub const WAMacShowFocusRect: WidgetAttribute = _
pub const WAMacShowFocusRect: WidgetAttribute = _
Indicates that this widget should get a QFocusFrame around it. Some widgets draw their own focus halo regardless of this attribute. Not that the QWidget::focusPolicy also plays the main role in whether something is given focus or not, this only controls whether or not this gets the focus frame. This attribute is only applicable to macOS. (C++ enum variant: WA_MacShowFocusRect = 88
)
sourcepub const WAMacNormalSize: WidgetAttribute = _
pub const WAMacNormalSize: WidgetAttribute = _
sourcepub const WAMacSmallSize: WidgetAttribute = _
pub const WAMacSmallSize: WidgetAttribute = _
sourcepub const WAMacMiniSize: WidgetAttribute = _
pub const WAMacMiniSize: WidgetAttribute = _
sourcepub const WALayoutUsesWidgetRect: WidgetAttribute = _
pub const WALayoutUsesWidgetRect: WidgetAttribute = _
Ignore the layout item rect from the style when laying out this widget with QLayout. (C++ enum variant: WA_LayoutUsesWidgetRect = 92
)
sourcepub const WAStyledBackground: WidgetAttribute = _
pub const WAStyledBackground: WidgetAttribute = _
Indicates the widget should be drawn using a styled background. (C++ enum variant: WA_StyledBackground = 93
)
sourcepub const WAMSWindowsUseDirect3D: WidgetAttribute = _
pub const WAMSWindowsUseDirect3D: WidgetAttribute = _
This value is obsolete and has no effect. (C++ enum variant: WA_MSWindowsUseDirect3D = 94
)
sourcepub const WACanHostQMdiSubWindowTitleBar: WidgetAttribute = _
pub const WACanHostQMdiSubWindowTitleBar: WidgetAttribute = _
C++ enum variant: WA_CanHostQMdiSubWindowTitleBar = 95
sourcepub const WAMacAlwaysShowToolWindow: WidgetAttribute = _
pub const WAMacAlwaysShowToolWindow: WidgetAttribute = _
On macOS, show the tool window even when the application is not active. By default, all tool windows are hidden when the application is inactive. (C++ enum variant: WA_MacAlwaysShowToolWindow = 96
)
sourcepub const WAStyleSheet: WidgetAttribute = _
pub const WAStyleSheet: WidgetAttribute = _
Indicates that the widget is styled using a style sheet. (C++ enum variant: WA_StyleSheet = 97
)
sourcepub const WAShowWithoutActivating: WidgetAttribute = _
pub const WAShowWithoutActivating: WidgetAttribute = _
Show the widget without making it active. (C++ enum variant: WA_ShowWithoutActivating = 98
)
sourcepub const WAX11BypassTransientForHint: WidgetAttribute = _
pub const WAX11BypassTransientForHint: WidgetAttribute = _
C++ enum variant: WA_X11BypassTransientForHint = 99
sourcepub const WANativeWindow: WidgetAttribute = _
pub const WANativeWindow: WidgetAttribute = _
Indicates 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. (C++ enum variant: WA_NativeWindow = 100
)
sourcepub const WADontCreateNativeAncestors: WidgetAttribute = _
pub const WADontCreateNativeAncestors: WidgetAttribute = _
Indicates that the widget’s ancestors are kept non-native even though the widget itself is native. (C++ enum variant: WA_DontCreateNativeAncestors = 101
)
sourcepub const WAMacVariableSize: WidgetAttribute = _
pub const WAMacVariableSize: WidgetAttribute = _
Indicates the widget can choose between alternative sizes for widgets to avoid clipping. This attribute is only applicable to macOS. (C++ enum variant: WA_MacVariableSize = 102
)
sourcepub const WADontShowOnScreen: WidgetAttribute = _
pub const WADontShowOnScreen: WidgetAttribute = _
Indicates that the widget is hidden or is not a part of the viewable Desktop. (C++ enum variant: WA_DontShowOnScreen = 103
)
sourcepub const WAX11NetWmWindowTypeDesktop: WidgetAttribute = _
pub const WAX11NetWmWindowTypeDesktop: WidgetAttribute = _
Adds _NET_WM_WINDOW_TYPE_DESKTOP 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. (C++ enum variant: WA_X11NetWmWindowTypeDesktop = 104
)
sourcepub const WAX11NetWmWindowTypeDock: WidgetAttribute = _
pub const WAX11NetWmWindowTypeDock: WidgetAttribute = _
Adds _NET_WM_WINDOW_TYPE_DOCK 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. (C++ enum variant: WA_X11NetWmWindowTypeDock = 105
)
sourcepub const WAX11NetWmWindowTypeToolBar: WidgetAttribute = _
pub const WAX11NetWmWindowTypeToolBar: WidgetAttribute = _
Adds _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. Note: Qt automatically sets this attribute for QToolBar. (C++ enum variant: WA_X11NetWmWindowTypeToolBar = 106
)
sourcepub const WAX11NetWmWindowTypeMenu: WidgetAttribute = _
pub const WAX11NetWmWindowTypeMenu: WidgetAttribute = _
Adds _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. Note: Qt automatically sets this attribute for QMenu when torn-off. (C++ enum variant: WA_X11NetWmWindowTypeMenu = 107
)
sourcepub const WAX11NetWmWindowTypeUtility: WidgetAttribute = _
pub const WAX11NetWmWindowTypeUtility: WidgetAttribute = _
Adds _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. Note: Qt automatically sets this attribute for the Qt::Tool window type. (C++ enum variant: WA_X11NetWmWindowTypeUtility = 108
)
sourcepub const WAX11NetWmWindowTypeSplash: WidgetAttribute = _
pub const WAX11NetWmWindowTypeSplash: WidgetAttribute = _
Adds _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. Note: Qt automatically sets this attribute for the Qt::SplashScreen window type. (C++ enum variant: WA_X11NetWmWindowTypeSplash = 109
)
sourcepub const WAX11NetWmWindowTypeDialog: WidgetAttribute = _
pub const WAX11NetWmWindowTypeDialog: WidgetAttribute = _
Adds _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. Note: Qt automatically sets this attribute for the Qt::Dialog and Qt::Sheet window types. (C++ enum variant: WA_X11NetWmWindowTypeDialog = 110
)
sourcepub const WAX11NetWmWindowTypeDropDownMenu: WidgetAttribute = _
pub const WAX11NetWmWindowTypeDropDownMenu: WidgetAttribute = _
Adds _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. Note: Qt automatically sets this attribute for QMenu objects added to a QMenuBar. (C++ enum variant: WA_X11NetWmWindowTypeDropDownMenu = 111
)
sourcepub const WAX11NetWmWindowTypePopupMenu: WidgetAttribute = _
pub const WAX11NetWmWindowTypePopupMenu: WidgetAttribute = _
Adds _NET_WM_WINDOW_TYPE_POPUP_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. Note: Qt automatically sets this attribute for QMenu. (C++ enum variant: WA_X11NetWmWindowTypePopupMenu = 112
)
sourcepub const WAX11NetWmWindowTypeToolTip: WidgetAttribute = _
pub const WAX11NetWmWindowTypeToolTip: WidgetAttribute = _
Adds _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. Note: Qt automatically sets this attribute for the Qt::ToolTip window type. (C++ enum variant: WA_X11NetWmWindowTypeToolTip = 113
)
sourcepub const WAX11NetWmWindowTypeNotification: WidgetAttribute = _
pub const WAX11NetWmWindowTypeNotification: WidgetAttribute = _
Adds _NET_WM_WINDOW_TYPE_NOTIFICATION 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. (C++ enum variant: WA_X11NetWmWindowTypeNotification = 114
)
sourcepub const WAX11NetWmWindowTypeCombo: WidgetAttribute = _
pub const WAX11NetWmWindowTypeCombo: WidgetAttribute = _
Adds _NET_WM_WINDOW_TYPE_COMBO 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. Note: Qt automatically sets this attribute for the QComboBox pop-up. (C++ enum variant: WA_X11NetWmWindowTypeCombo = 115
)
sourcepub const WAX11NetWmWindowTypeDND: WidgetAttribute = _
pub const WAX11NetWmWindowTypeDND: WidgetAttribute = _
Adds _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. Note: Qt automatically sets this attribute on the feedback widget used during a drag. (C++ enum variant: WA_X11NetWmWindowTypeDND = 116
)
sourcepub const WAMacFrameworkScaled: WidgetAttribute = _
pub const WAMacFrameworkScaled: WidgetAttribute = _
Enables 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. (C++ enum variant: WA_MacFrameworkScaled = 117
)
sourcepub const WASetWindowModality: WidgetAttribute = _
pub const WASetWindowModality: WidgetAttribute = _
C++ enum variant: WA_SetWindowModality = 118
sourcepub const WAWStateWindowOpacitySet: WidgetAttribute = _
pub const WAWStateWindowOpacitySet: WidgetAttribute = _
C++ enum variant: WA_WState_WindowOpacitySet = 119
sourcepub const WATranslucentBackground: WidgetAttribute = _
pub const WATranslucentBackground: WidgetAttribute = _
Indicates that the widget should have a translucent background, i.e., 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. This flag is set or cleared by the widget’s author. (C++ enum variant: WA_TranslucentBackground = 120
)
sourcepub const WAAcceptTouchEvents: WidgetAttribute = _
pub const WAAcceptTouchEvents: WidgetAttribute = _
Allows 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. (C++ enum variant: WA_AcceptTouchEvents = 121
)
sourcepub const WAWStateAcceptedTouchBeginEvent: WidgetAttribute = _
pub const WAWStateAcceptedTouchBeginEvent: WidgetAttribute = _
C++ enum variant: WA_WState_AcceptedTouchBeginEvent = 122
sourcepub const WATouchPadAcceptSingleTouchEvents: WidgetAttribute = _
pub const WATouchPadAcceptSingleTouchEvents: WidgetAttribute = _
Allows touchpad single touch events to be sent to the widget. (C++ enum variant: WA_TouchPadAcceptSingleTouchEvents = 123
)
sourcepub const WAX11DoNotAcceptFocus: WidgetAttribute = _
pub const WAX11DoNotAcceptFocus: WidgetAttribute = _
Asks the window manager to not give focus to this top level window. This attribute has no effect on non-X11 platforms. (C++ enum variant: WA_X11DoNotAcceptFocus = 126
)
sourcepub const WAMacNoShadow: WidgetAttribute = _
pub const WAMacNoShadow: WidgetAttribute = _
C++ enum variant: WA_MacNoShadow = 127
sourcepub const WAAlwaysStackOnTop: WidgetAttribute = _
pub const WAAlwaysStackOnTop: WidgetAttribute = _
Since Qt 5.4, this value forces QOpenGLWidget and QQuickWidget to be drawn last, on top of other widgets. Ignored for other type of widgets. Setting this attribute breaks the stacking order, but allows having a semi-transparent OpenGL widget with other widgets visible underneath. It is strongly recommended to call update() on the widget’s top-level window after enabling or disabling this attribute. (C++ enum variant: WA_AlwaysStackOnTop = 128
)
sourcepub const WATabletTracking: WidgetAttribute = _
pub const WATabletTracking: WidgetAttribute = _
Indicates that the widget has tablet tracking enabled. See QWidget::tabletTracking. (C++ enum variant: WA_TabletTracking = 129
)
sourcepub const WAContentsMarginsRespectsSafeArea: WidgetAttribute = _
pub const WAContentsMarginsRespectsSafeArea: WidgetAttribute = _
A QWidget respects the safe area margins of a window by incorporating the margins into its contents’ margins by default. This means, that a QLayout will use the content area of a widget for its layout, unless the Qt::WA_LayoutOnEntireRect attribute is set. This along with a contents margin of 0 can be used on the actual layout, to allow for example a background image to underlay the status bar and other system areas on an iOS device, while still allowing child widgets of that background to be inset based on the safe area. (C++ enum variant: WA_ContentsMarginsRespectsSafeArea = 130
)
sourcepub const WAAttributeCount: WidgetAttribute = _
pub const WAAttributeCount: WidgetAttribute = _
C++ enum variant: WA_AttributeCount = 131
sourcepub const WAStyleSheetTarget: WidgetAttribute = _
pub const WAStyleSheetTarget: WidgetAttribute = _
Indicates that the widget appearance was modified by a style sheet. WA_StyleSheet will also be set. (C++ enum variant: WA_StyleSheetTarget = 131
)
sourcepub const WAAttributeCount2: WidgetAttribute = _
pub const WAAttributeCount2: WidgetAttribute = _
C++ enum variant: WA_AttributeCount = 132
Trait Implementations§
source§impl Clone for WidgetAttribute
impl Clone for WidgetAttribute
source§fn clone(&self) -> WidgetAttribute
fn clone(&self) -> WidgetAttribute
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WidgetAttribute
impl Debug for WidgetAttribute
source§impl From<WidgetAttribute> for c_int
impl From<WidgetAttribute> for c_int
source§fn from(value: WidgetAttribute) -> Self
fn from(value: WidgetAttribute) -> Self
source§impl From<i32> for WidgetAttribute
impl From<i32> for WidgetAttribute
source§impl PartialEq for WidgetAttribute
impl PartialEq for WidgetAttribute
source§fn eq(&self, other: &WidgetAttribute) -> bool
fn eq(&self, other: &WidgetAttribute) -> bool
self
and other
values to be equal, and is used
by ==
.