PySide6.QtWidgets.QGraphicsColorizeEffect¶
- class QGraphicsColorizeEffect¶
QGraphicsColorizeEffect
类提供了一种着色效果。更多…在版本4.6中添加。
概要¶
属性¶
方法¶
def
__init__()
def
color()
def
strength()
插槽¶
def
setColor()
def
setStrength()
信号¶
def
colorChanged()
注意
本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。
详细描述¶
颜色化效果会使用其
color()
的色调渲染源。可以使用setColor()
函数修改颜色。默认情况下,颜色为浅蓝色(QColor(0, 0, 192))。
注意
当使用
from __feature__ import true_property
时,属性可以直接使用,否则通过访问器函数使用。此属性保存效果的颜色。
默认情况下,颜色为浅蓝色(QColor(0, 0, 192))。
- Access functions:
- property strengthᅟ: float¶
此属性保存效果的强度。
默认情况下,强度为1.0。强度0.0表示没有效果,而1.0表示完全着色。
- Access functions:
构造一个新的
QGraphicsColorizeEffect
实例。parent
参数传递给QGraphicsEffect
的构造函数。- color()¶
- Return type:
另请参阅
属性
colorᅟ
的获取器。每当效果的颜色发生变化时,都会发出此信号。
color
参数保存效果的新颜色。属性
colorᅟ
的通知信号。属性
colorᅟ
的设置器。- setStrength(strength)¶
- Parameters:
strength – 浮点数
另请参阅
属性
strengthᅟ
的设置器。- strength()¶
- Return type:
浮点数
另请参阅
属性
strengthᅟ
的获取器。- strengthChanged(strength)¶
- Parameters:
strength – 浮点数
每当
setStrength()
更改着色强度属性时,都会发出此信号。strength
包含着色效果的新强度值。属性
strengthᅟ
的通知信号。