[][src]Struct qt_core::WindowType

#[repr(transparent)]
pub struct WindowType(_);

This enum type is used to specify various window-system properties for the widget. They are fairly unusual but necessary in a few cases. Some of these flags depend on whether the underlying window manager supports them.

C++ enum: Qt::WindowType.

C++ documentation:

This enum type is used to specify various window-system properties for the widget. They are fairly unusual but necessary in a few cases. Some of these flags depend on whether the underlying window manager supports them.

The main types are

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:

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

The WindowFlags type is a typedef for QFlags<WindowType>. It stores an OR combination of WindowType values.

See also QWidget::windowFlags and Window Flags Example.

Methods

impl WindowType[src]

pub fn to_int(&self) -> c_int[src]

impl WindowType[src]

pub const Widget: WindowType[src]

This is the default type for QWidget. Widgets of this type are child widgets if they have a parent, and independent windows if they have no parent. See also Qt::Window and Qt::SubWindow. (C++ enum variant: Widget = 0)

pub const Window: WindowType[src]

Indicates that the widget is a window, usually with a window system frame and a title bar, irrespective of whether the widget has a parent or not. Note that it is not possible to unset this flag if the widget does not have a parent. (C++ enum variant: Window = 1)

pub const Dialog: WindowType[src]

Indicates that the widget is a window that should be decorated as a dialog (i.e., typically no maximize or minimize buttons in the title bar). This is the default type for QDialog. If you want to use it as a modal dialog, it should be launched from another window, or have a parent and used with the QWidget::windowModality property. If you make it modal, the dialog will prevent other top-level windows in the application from getting any input. We refer to a top-level window that has a parent as a secondary window. (C++ enum variant: Dialog = 3)

pub const Sheet: WindowType[src]

Indicates that the window is a sheet on macOS. Since using a sheet implies window modality, the recommended way is to use QWidget::setWindowModality(), or QDialog::open(), instead. (C++ enum variant: Sheet = 5)

pub const Drawer: WindowType[src]

Indicates that the widget is a drawer on macOS. (C++ enum variant: Drawer = 7)

pub const Popup: WindowType[src]

Indicates that the widget is a pop-up top-level window, i.e. that it is modal, but has a window system frame appropriate for pop-up menus. (C++ enum variant: Popup = 9)

pub const Tool: WindowType[src]

Indicates that the widget is a tool window. A tool window is often a small window with a smaller than usual title bar and decoration, typically used for collections of tool buttons. If there is a parent, the tool window will always be kept on top of it. If there isn't a parent, you may consider using Qt::WindowStaysOnTopHint as well. If the window system supports it, a tool window can be decorated with a somewhat lighter frame. It can also be combined with Qt::FramelessWindowHint. On macOS, tool windows correspond to the Floating class of windows. This means that the window lives on a level above normal windows making it impossible to put a normal window on top of it. By default, tool windows will disappear when the application is inactive. This can be controlled by the Qt::WA_MacAlwaysShowToolWindow attribute. (C++ enum variant: Tool = 11)

pub const ToolTip: WindowType[src]

Indicates that the widget is a tooltip. This is used internally to implement tooltips. (C++ enum variant: ToolTip = 13)

pub const SplashScreen: WindowType[src]

Indicates that the window is a splash screen. This is the default type for QSplashScreen. (C++ enum variant: SplashScreen = 15)

pub const Desktop: WindowType[src]

Indicates that this widget is the desktop. This is the type for QDesktopWidget. (C++ enum variant: Desktop = 17)

pub const SubWindow: WindowType[src]

Indicates that this widget is a sub-window, such as a QMdiSubWindow widget. (C++ enum variant: SubWindow = 18)

pub const ForeignWindow: WindowType[src]

Indicates that this window object is a handle representing a native platform window created by another process or by manually using native code. (C++ enum variant: ForeignWindow = 33)

pub const CoverWindow: WindowType[src]

Indicates that the window represents a cover window, which is shown when the application is minimized on some platforms. (C++ enum variant: CoverWindow = 65)

pub const WindowTypeMask: WindowType[src]

A mask for extracting the window type part of the window flags. (C++ enum variant: WindowType_Mask = 255)

pub const MSWindowsFixedSizeDialogHint: WindowType[src]

Gives the window a thin dialog border on Windows. This style is traditionally used for fixed-size dialogs. (C++ enum variant: MSWindowsFixedSizeDialogHint = 256)

pub const MSWindowsOwnDC: WindowType[src]

Gives the window its own display context on Windows. (C++ enum variant: MSWindowsOwnDC = 512)

pub const BypassWindowManagerHint: WindowType[src]

This flag can be used to indicate to the platform plugin that "all" window manager protocols should be disabled. This flag will behave different depending on what operating system the application is running on and what window manager is running. The flag can be used to get a native window with no configuration set. (C++ enum variant: BypassWindowManagerHint = 1024)

pub const X11BypassWindowManagerHint: WindowType[src]

Bypass the window manager completely. This results in a borderless window that is not managed at all (i.e., no keyboard input unless you call QWidget::activateWindow() manually). (C++ enum variant: X11BypassWindowManagerHint = 1024)

pub const FramelessWindowHint: WindowType[src]

Produces a borderless window. The user cannot move or resize a borderless window via the window system. On X11, the result of the flag is dependent on the window manager and its ability to understand Motif and/or NETWM hints. Most existing modern window managers can handle this. (C++ enum variant: FramelessWindowHint = 2048)

pub const WindowTitleHint: WindowType[src]

Gives the window a title bar. (C++ enum variant: WindowTitleHint = 4096)

pub const WindowSystemMenuHint: WindowType[src]

Adds a window system menu, and possibly a close button (for example on Mac). If you need to hide or show a close button, it is more portable to use WindowCloseButtonHint. (C++ enum variant: WindowSystemMenuHint = 8192)

pub const WindowMinimizeButtonHint: WindowType[src]

Adds a minimize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work. (C++ enum variant: WindowMinimizeButtonHint = 16384)

pub const WindowMaximizeButtonHint: WindowType[src]

Adds a maximize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work. (C++ enum variant: WindowMaximizeButtonHint = 32768)

pub const WindowMinMaxButtonsHint: WindowType[src]

Adds a minimize and a maximize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work. (C++ enum variant: WindowMinMaxButtonsHint = 49152)

pub const WindowContextHelpButtonHint: WindowType[src]

Adds a context help button to dialogs. On some platforms this implies Qt::WindowSystemMenuHint for it to work. (C++ enum variant: WindowContextHelpButtonHint = 65536)

pub const WindowShadeButtonHint: WindowType[src]

Adds a shade button in place of the minimize button if the underlying window manager supports it. (C++ enum variant: WindowShadeButtonHint = 131072)

pub const WindowStaysOnTopHint: WindowType[src]

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 pass Qt::X11BypassWindowManagerHint for this flag to work correctly. (C++ enum variant: WindowStaysOnTopHint = 262144)

pub const WindowTransparentForInput: WindowType[src]

Informs the window system that this window is used only for output (displaying something) and does not take input. Therefore input events should pass through as if it wasn't there. (C++ enum variant: WindowTransparentForInput = 524288)

pub const WindowOverridesSystemGestures: WindowType[src]

Informs the window system that this window implements its own set of gestures and that system level gestures, like for instance three-finger desktop switching, should be disabled. (C++ enum variant: WindowOverridesSystemGestures = 1048576)

pub const WindowDoesNotAcceptFocus: WindowType[src]

Informs the window system that this window should not receive the input focus. (C++ enum variant: WindowDoesNotAcceptFocus = 2097152)

pub const MaximizeUsingFullscreenGeometryHint: WindowType[src]

Informs the window system that when maximizing the window it should use as much of the available screen geometry as possible, including areas that may be covered by system UI such as status bars or application launchers. This may result in the window being placed under these system UIs, but does not guarantee it, depending on whether or not the platform supports it. When the flag is enabled the user is responsible for taking QScreen::availableGeometry() into account, so that any UI elements in the application that require user interaction are not covered by system UI. (C++ enum variant: MaximizeUsingFullscreenGeometryHint = 4194304)

pub const CustomizeWindowHint: WindowType[src]

Turns off the default window title hints. (C++ enum variant: CustomizeWindowHint = 33554432)

pub const WindowStaysOnBottomHint: WindowType[src]

Informs the window system that the window should stay on bottom of all other windows. Note that on X11 this hint will work only in window managers that support _NET_WM_STATE_BELOW atom. If a window always on the bottom has a parent, the parent will also be left on the bottom. This window hint is currently not implemented for macOS. (C++ enum variant: WindowStaysOnBottomHint = 67108864)

pub const WindowCloseButtonHint: WindowType[src]

Adds a close button. On some platforms this implies Qt::WindowSystemMenuHint for it to work. (C++ enum variant: WindowCloseButtonHint = 134217728)

pub const MacWindowToolBarButtonHint: WindowType[src]

On macOS adds a tool bar button (i.e., the oblong button that is on the top right of windows that have toolbars). (C++ enum variant: MacWindowToolBarButtonHint = 268435456)

pub const BypassGraphicsProxyWidget: WindowType[src]

Prevents the window and its children from automatically embedding themselves into a QGraphicsProxyWidget if the parent widget is already embedded. You can set this flag if you want your widget to always be a toplevel widget on the desktop, regardless of whether the parent widget is embedded in a scene or not. (C++ enum variant: BypassGraphicsProxyWidget = 536870912)

pub const NoDropShadowWindowHint: WindowType[src]

Disables window drop shadow on supporting platforms. (C++ enum variant: NoDropShadowWindowHint = 1073741824)

pub const WindowFullscreenButtonHint: WindowType[src]

On macOS adds a fullscreen button. (C++ enum variant: WindowFullscreenButtonHint = -2147483648)

Trait Implementations

impl From<i32> for WindowType[src]

impl From<WindowType> for c_int[src]

impl From<WindowType> for QFlags<WindowType>[src]

impl Clone for WindowType[src]

impl Copy for WindowType[src]

impl Eq for WindowType[src]

impl PartialEq<WindowType> for WindowType[src]

impl Debug for WindowType[src]

impl<T: Into<QFlags<WindowType>>> BitOr<T> for WindowType[src]

type Output = QFlags<WindowType>

The resulting type after applying the | operator.

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]