[][src]Struct qt_core::ApplicationAttribute

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

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

C++ enum: Qt::ApplicationAttribute.

C++ documentation:

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

The following values are deprecated or obsolete:

Methods

impl ApplicationAttribute[src]

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

impl ApplicationAttribute[src]

pub const AAImmediateWidgetCreation: ApplicationAttribute[src]

This attribute is no longer fully supported in Qt 5. It ensures that widgets are created as soon as they are constructed. By default, resources for widgets are allocated on demand to improve efficiency and minimize resource usage. Setting or clearing this attribute affects widgets constructed after the change. Setting it tells Qt to create toplevel windows immediately. Therefore, if it is important to minimize resource consumption, do not set this attribute. (C++ enum variant: AA_ImmediateWidgetCreation = 0)

pub const AAMSWindowsUseDirect3DByDefault: ApplicationAttribute[src]

This value is obsolete and has no effect. (C++ enum variant: AA_MSWindowsUseDirect3DByDefault = 1)

pub const AADontShowIconsInMenus: ApplicationAttribute[src]

Actions with the Icon property won't be shown in any menus unless specifically set by the QAction::iconVisibleInMenu property. Menus that are currently open or menus already created in the native macOS menubar may not pick up a change in this attribute. Changes in the QAction::iconVisibleInMenu property will always be picked up. (C++ enum variant: AA_DontShowIconsInMenus = 2)

pub const AANativeWindows: ApplicationAttribute[src]

Ensures that widgets have native windows. (C++ enum variant: AA_NativeWindows = 3)

pub const AADontCreateNativeWidgetSiblings: ApplicationAttribute[src]

Ensures that siblings of native widgets stay non-native unless specifically set by the Qt::WA_NativeWindow attribute. (C++ enum variant: AA_DontCreateNativeWidgetSiblings = 4)

pub const AAPluginApplication: ApplicationAttribute[src]

Indicates that Qt is used to author a plugin. Depending on the operating system, it suppresses specific initializations that do not necessarily make sense in the plugin case. For example on macOS, this includes avoiding loading our nib for the main menu and not taking possession of the native menu bar. Setting this attribute to true will also set the AA_DontUseNativeMenuBar attribute to true. It also disables native event filters. This attribute has been added in Qt 5.7. It must be set before Q(Gui)Application is constructed. (C++ enum variant: AA_PluginApplication = 5)

pub const AAMacPluginApplication: ApplicationAttribute[src]

This attribute has been deprecated. Use AA_PluginApplication instead. (C++ enum variant: AA_MacPluginApplication = 5)

pub const AADontUseNativeMenuBar: ApplicationAttribute[src]

All menubars created while this attribute is set to true won't be used as a native menubar (e.g, the menubar at the top of the main screen on macOS). (C++ enum variant: AA_DontUseNativeMenuBar = 6)

pub const AAMacDontSwapCtrlAndMeta: ApplicationAttribute[src]

On macOS by default, Qt swaps the Control and Meta (Command) keys (i.e., whenever Control is pressed, Qt sends Meta, and whenever Meta is pressed Control is sent). When this attribute is true, Qt will not do the flip. QKeySequence::StandardKey will also flip accordingly (i.e., QKeySequence::Copy will be Command+C on the keyboard regardless of the value set, though what is output for QKeySequence::toString() will be different). (C++ enum variant: AA_MacDontSwapCtrlAndMeta = 7)

pub const AAUse96Dpi: ApplicationAttribute[src]

Assume the screen has a resolution of 96 DPI rather than using the OS-provided resolution. This will cause font rendering to be consistent in pixels-per-point across devices rather than defining 1 point as 1/72 inch. (C++ enum variant: AA_Use96Dpi = 8)

pub const AAX11InitThreads: ApplicationAttribute[src]

This value is obsolete and has no effect. (C++ enum variant: AA_X11InitThreads = 10)

pub const AASynthesizeTouchForUnhandledMouseEvents: ApplicationAttribute[src]

All mouse events that are not accepted by the application will be translated to touch events instead. (C++ enum variant: AA_SynthesizeTouchForUnhandledMouseEvents = 11)

pub const AASynthesizeMouseForUnhandledTouchEvents: ApplicationAttribute[src]

All touch events that are not accepted by the application will be translated to left button mouse events instead. This attribute is enabled by default. (C++ enum variant: AA_SynthesizeMouseForUnhandledTouchEvents = 12)

pub const AAUseHighDpiPixmaps: ApplicationAttribute[src]

Make QIcon::pixmap() generate high-dpi pixmaps that can be larger than the requested size. Such pixmaps will have devicePixelRatio() set to a value higher than 1. After setting this attribute, application code that uses pixmap sizes in layout geometry calculations should typically divide by devicePixelRatio() to get device-independent layout geometry. (C++ enum variant: AA_UseHighDpiPixmaps = 13)

pub const AAForceRasterWidgets: ApplicationAttribute[src]

Make top-level widgets use pure raster surfaces, and do not support non-native GL-based child widgets. (C++ enum variant: AA_ForceRasterWidgets = 14)

pub const AAUseDesktopOpenGL: ApplicationAttribute[src]

Forces the usage of desktop OpenGL (for example, opengl32.dll or libGL.so) on platforms that use dynamic loading of the OpenGL implementation. This value has been added in Qt 5.3. This attribute must be set before Q(Gui)Application is constructed. (C++ enum variant: AA_UseDesktopOpenGL = 15)

pub const AAUseOpenGLES: ApplicationAttribute[src]

Forces the usage of OpenGL ES 2.0 or higher on platforms that use dynamic loading of the OpenGL implementation. This value has been added in Qt 5.3. This attribute must be set before Q(Gui)Application is constructed. (C++ enum variant: AA_UseOpenGLES = 16)

pub const AAUseSoftwareOpenGL: ApplicationAttribute[src]

Forces the usage of a software based OpenGL implementation on platforms that use dynamic loading of the OpenGL implementation. This will typically be a patched build of Mesa llvmpipe, providing OpenGL 2.1. The value may have no effect if no such OpenGL implementation is available. The default name of this library is opengl32sw.dll and can be overridden by setting the environment variable QT_OPENGL_DLL. See the platform-specific pages, for instance Qt for Windows, for more information. This value has been added in Qt 5.4. This attribute must be set before Q(Gui)Application is constructed. (C++ enum variant: AA_UseSoftwareOpenGL = 17)

pub const AAShareOpenGLContexts: ApplicationAttribute[src]

Enables resource sharing between the OpenGL contexts used by classes like QOpenGLWidget and QQuickWidget. This allows sharing OpenGL resources, like textures, between QOpenGLWidget instances that belong to different top-level windows. This value has been added in Qt 5.4. This attribute must be set before Q(Gui)Application is constructed. (C++ enum variant: AA_ShareOpenGLContexts = 18)

pub const AASetPalette: ApplicationAttribute[src]

Indicates whether a palette was explicitly set on the Q(Gui)Application. This value has been added in Qt 5.5. (C++ enum variant: AA_SetPalette = 19)

pub const AAEnableHighDpiScaling: ApplicationAttribute[src]

Enables high-DPI scaling in Qt on supported platforms (see also High DPI Displays). Supported platforms are X11, Windows and Android. Enabling makes Qt scale the main (device independent) coordinate system according to display scale factors provided by the operating system. This corresponds to setting the QT_AUTO_SCREEN​_SCALE_FACTOR environment variable to 1. This value has been added in Qt 5.6. This attribute must be set before Q(Gui)Application is constructed. (C++ enum variant: AA_EnableHighDpiScaling = 20)

pub const AADisableHighDpiScaling: ApplicationAttribute[src]

Disables high-DPI scaling in Qt, exposing window system coordinates. Note that the window system may do its own scaling, so this does not guarantee that QPaintDevice::devicePixelRatio() will be equal to 1. In addition, scale factors set by QT_SCALE_FACTOR will not be affected. This corresponds to setting the QT_AUTO_SCREEN​_SCALE_FACTOR environment variable to 0. This value has been added in Qt 5.6. This attribute must be set before Q(Gui)Application is constructed. (C++ enum variant: AA_DisableHighDpiScaling = 21)

pub const AAUseStyleSheetPropagationInWidgetStyles: ApplicationAttribute[src]

By default, Qt Style Sheets disable regular QWidget palette and font propagation. When this flag is enabled, font and palette changes propagate as though the user had manually called the corresponding QWidget methods. See The Style Sheet Syntax - Inheritance for more details. This value has been added in Qt 5.7. (C++ enum variant: AA_UseStyleSheetPropagationInWidgetStyles = 22)

pub const AADontUseNativeDialogs: ApplicationAttribute[src]

All dialogs created while this attribute is set to true won't use the native dialogs provided by the platform. This value has been added in Qt 5.7. (C++ enum variant: AA_DontUseNativeDialogs = 23)

pub const AASynthesizeMouseForUnhandledTabletEvents: ApplicationAttribute[src]

All tablet events that are not accepted by the application will be translated to mouse events instead. This attribute is enabled by default. This value has been added in Qt 5.7. (C++ enum variant: AA_SynthesizeMouseForUnhandledTabletEvents = 24)

pub const AACompressHighFrequencyEvents: ApplicationAttribute[src]

Enables compression of certain frequent events. On the X11 windowing system, the default value is true, which means that QEvent::MouseMove, QEvent::TouchUpdate, and changes in window size and position will be combined whenever they occur more frequently than the application handles them, so that they don't accumulate and overwhelm the application later. On other platforms, the default is false. (In the future, the compression feature may be implemented across platforms.) You can test the attribute to see whether compression is enabled. If your application needs to handle all events with no compression, you can unset this attribute. This value has been added in Qt 5.7. (C++ enum variant: AA_CompressHighFrequencyEvents = 25)

pub const AADontCheckOpenGLContextThreadAffinity: ApplicationAttribute[src]

When making a context current using QOpenGLContext, do not check that the QObject thread affinity of the QOpenGLContext object is the same thread calling makeCurrent(). This value has been added in Qt 5.8. (C++ enum variant: AA_DontCheckOpenGLContextThreadAffinity = 26)

pub const AADisableShaderDiskCache: ApplicationAttribute[src]

Disables caching of shader program binaries on disk. By default Qt Quick, QPainter's OpenGL backend, and any application using QOpenGLShaderProgram with one of its addCacheableShaderFromSource overloads will employ a disk-based program binary cache in either the shared or per-process cache storage location, on systems that support glProgramBinary(). In the unlikely event of this being problematic, set this attribute to disable all disk-based caching of shaders. (C++ enum variant: AA_DisableShaderDiskCache = 27)

pub const AAAttributeCount: ApplicationAttribute[src]

C++ enum variant: AA_AttributeCount = 28

pub const AADontShowShortcutsInContextMenus: ApplicationAttribute[src]

Actions with the Shortcut property won't be shown in any shortcut menus unless specifically set by the QAction::shortcutVisibleInContextMenu property. This value was added in Qt 5.10. (C++ enum variant: AA_DontShowShortcutsInContextMenus = 28)

pub const AACompressTabletEvents: ApplicationAttribute[src]

Enables compression of input events from tablet devices. Notice that AA_CompressHighFrequencyEvents must be true for events compression to be enabled, and that this flag extends the former to tablet events. Its default value is false. This value was added in Qt 5.10. (C++ enum variant: AA_CompressTabletEvents = 29)

pub const AADisableWindowContextHelpButton: ApplicationAttribute[src]

Disables the WindowContextHelpButtonHint by default on Qt::Sheet and Qt::Dialog widgets. This hides the ? button on Windows, which only makes sense if you use QWhatsThis functionality. This value was added in Qt 5.10. In Qt 6, WindowContextHelpButtonHint will not be set by default. (C++ enum variant: AA_DisableWindowContextHelpButton = 30)

pub const AAAttributeCount2: ApplicationAttribute[src]

C++ enum variant: AA_AttributeCount = 31

Trait Implementations

impl From<i32> for ApplicationAttribute[src]

impl From<ApplicationAttribute> for c_int[src]

impl Clone for ApplicationAttribute[src]

impl Copy for ApplicationAttribute[src]

impl Eq for ApplicationAttribute[src]

impl PartialEq<ApplicationAttribute> for ApplicationAttribute[src]

impl Debug for ApplicationAttribute[src]

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]