IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

Detailed Description

This struct was introduced in Qt 5.9.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

  • Header: ScaledPixmapArgument

  • Since: Qt 5.9

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Gui)

    target_link_libraries(mytarget PRIVATE Qt6::Gui)

  • qmake: QT += gui

Detailed Description

This struct represents arguments to the virtual_hook() function when the id parameter is QIconEngine::ScaledPixmapHook.

The struct provides a way for icons created via QIcon::fromTheme() to return pixmaps that are designed for the current device pixel ratio. The scale for such an icon is specified using the Scale directory key in the appropriate index.theme file.

Icons created via other approaches will return the same result as a call to pixmap() would, and continue to benefit from Qt's "@nx" high DPI syntax.

See Also

Member Variable Documentation

 

QIcon::Mode ScaledPixmapArgument::mode

This variable holds the requested mode of the pixmap.

See Also

See also QIcon::Mode

QPixmap ScaledPixmapArgument::pixmap

This variable holds the pixmap that is the best match for the given size, mode, state, and scale. This is an output parameter that is set after calling virtual_hook().

qreal ScaledPixmapArgument::scale

This variable holds the requested scale of the pixmap.

QSize ScaledPixmapArgument::size

This variable holds the requested size of the pixmap.

QIcon::State ScaledPixmapArgument::state

This variable holds the requested state of the pixmap.

See Also

See also QIcon::State

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+