• PySide 模块
  • PySide.QtGui
  • 内容表

    上一话题

    QIcon

    下一话题

    QGraphicsItemGroup

    QIconEngineV2

    概要

    函数

    虚函数

    详细描述

    PySide.QtGui.QIconEngineV2 class provides an abstract base class for PySide.QtGui.QIcon renderers.

    An icon engine renders PySide.QtGui.QIcon s. With icon engines, you can customize icons. Qt provides a default engine that makes icons adhere to the current style by scaling the icons and providing a disabled appearance.

    An engine is installed on an icon either through a PySide.QtGui.QIcon constructor or through a QIconEnginePluginV2 . The plugins are used by Qt if a specific engine is not given when the icon is created. See the PySide.QtGui.QIconEngineV2 class description to learn how to create icon engine plugins.

    An icon engine provides the rendering functions for a PySide.QtGui.QIcon . Each icon has a corresponding icon engine that is responsible for drawing the icon with a requested size, mode and state.

    PySide.QtGui.QIconEngineV2 extends the API of PySide.QtGui.QIconEngine to allow streaming of the icon engine contents, and should be used instead of PySide.QtGui.QIconEngine for implementing new icon engines.

    另请参阅

    QIconEnginePluginV2

    class PySide.QtGui. QIconEngineV2
    PySide.QtGui.QIconEngineV2. IconEngineHook

    These enum values are used for PySide.QtGui.QIconEngineV2.virtual_hook() to allow additional queries to icon engine without breaking binary compatibility.

    常量 描述
    QIconEngineV2.AvailableSizesHook Allows to query the sizes of the contained pixmaps for pixmap-based engines. The data argument of the PySide.QtGui.QIconEngineV2.virtual_hook() function is a AvailableSizesArgument pointer that should be filled with icon sizes. Engines that work in terms of a scalable, vectorial format normally return an empty list.
    QIconEngineV2.IconNameHook Allows to query the name used to create the icon, for example when instantiating an icon using QIcon.fromTheme() .

    另请参阅

    PySide.QtGui.QIconEngineV2.virtual_hook()

    PySide.QtGui.QIconEngineV2. availableSizes ( [ mode=QIcon.Normal [ , state=QIcon.Off ] ] )
    参数:
    返回类型:

    PySide.QtGui.QIconEngineV2. clone ( )
    返回类型: PySide.QtGui.QIconEngineV2

    Returns a clone of this icon engine.

    PySide.QtGui.QIconEngineV2. iconName ( )
    返回类型: unicode

    Returns the name used to create the engine, if available.

    注意

    This is a helper method and the actual work is done by PySide.QtGui.QIconEngineV2.virtual_hook() method, hence this method depends on icon engine support and may not work with all icon engines.

    PySide.QtGui.QIconEngineV2. key ( )
    返回类型: unicode

    Returns a key that identifies this icon engine.

    PySide.QtGui.QIconEngineV2. read ( in )
    参数: in PySide.QtCore.QDataStream
    返回类型: PySide.QtCore.bool

    Reads icon engine contents from the PySide.QtCore.QDataStream in . Returns true if the contents were read; otherwise returns false.

    PySide.QtGui.QIconEngineV2 ‘s default implementation always return false.

    PySide.QtGui.QIconEngineV2. write ( out )
    参数: out PySide.QtCore.QDataStream
    返回类型: PySide.QtCore.bool

    Writes the contents of this engine to the PySide.QtCore.QDataStream out . Returns true if the contents were written; otherwise returns false.

    PySide.QtGui.QIconEngineV2 ‘s default implementation always return false.