이 페이지에서

QGraphicsColorizeEffect Class

QGraphicsColorizeEffect 클래스는 색상 효과 기능을 제공합니다. 더 보기...

헤더: #include <QGraphicsColorizeEffect>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
상속: QGraphicsEffect

속성

공개 함수

QGraphicsColorizeEffect(QObject *parent = nullptr)
virtual ~QGraphicsColorizeEffect()
QColor color() const
qreal strength() const

공개 슬롯

void setColor(const QColor &c)
void setStrength(qreal strength)

신호

void colorChanged(const QColor &color)
void strengthChanged(qreal strength)

재구현된 보호 함수

virtual void draw(QPainter *painter) override

상세 설명

colorize 효과는 소스에 color()의 색조를 적용하여 렌더링합니다. 색상은 setColor() 함수를 사용하여 수정할 수 있습니다.

기본적으로 색상은 연한 파란색(QColor(0, 0, 192))입니다.

물고기 이미지에 적용된 파란색 효과

QGraphicsDropShadowEffect, QGraphicsBlurEffect 및 QGraphicsOpacityEffect도 참조하십시오 .

속성 설명서

color : QColor

이 속성은 효과의 색상을 지정합니다.

기본적으로 색상은 연한 파란색(QColor(0, 0, 192))입니다.

액세스 함수:

QColor color() const
void setColor(const QColor &c)

알림 신호:

void colorChanged(const QColor &color)

strength : qreal

이 속성은 효과의 강도를 나타냅니다.

기본적으로 강도는 1.0입니다. 강도 0.0은 효과가 없는 것을 의미하며, 1.0은 완전한 채색을 의미합니다.

액세스 함수:

qreal strength() const
void setStrength(qreal strength)

알림 신호:

void strengthChanged(qreal strength)

멤버 함수 문서

QGraphicsColorizeEffect::QGraphicsColorizeEffect(QObject *parent = nullptr)

새로운 QGraphicsColorizeEffect 인스턴스를 생성합니다. ` parent ` 매개변수는 ` QGraphicsEffect`의 생성자에 전달됩니다.

[virtual noexcept] QGraphicsColorizeEffect::~QGraphicsColorizeEffect()

효과를 해제합니다.

[signal] void QGraphicsColorizeEffect::colorChanged(const QColor &color)

이 신호는 이펙트의 색상이 변경될 때마다 발생합니다. ` color ` 매개변수에는 이펙트의 새로운 색상이 저장됩니다.

참고: 속성 ` color`에 대한알림 신호입니다.

[override virtual protected] void QGraphicsColorizeEffect::draw(QPainter *painter)

QGraphicsEffect::draw(QPainter *painter)를 재구현합니다.

[signal] void QGraphicsColorizeEffect::strengthChanged(qreal strength)

setStrength()가 colorize 강도 속성을 변경할 때마다 이 신호가 발생합니다. strength 에는 colorize 효과의 새로운 강도 값이 포함됩니다.

참고: strength 속성에 대한Notifier 신호입니다.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.