QtGraphicalEffects 는 Qt 6.x 버전에서 QtQuick.Effects로 변경됨

Code Genie·2024년 11월 20일

간단한 예제

import QtQuick 2.15
import QtQuick.Effects

Rectangle {
    width: 500
    height: 500
    color: "#fff"

    Text {
        text: "MultiEffect Demo"
        font.pixelSize: 50
        color: "white"
        anchors.centerIn: parent

        layer.enabled: true
        layer.effect: MultiEffect {
            blurEnabled: true
            blur: 0.1

            shadowEnabled: true
            shadowBlur: 0.2
            shadowHorizontalOffset: 2
            shadowVerticalOffset: 2
            shadowColor: "gray"

            colorization: 1
            colorizationColor: "#f3f3f3"

            // brightness: 0.2
            // contrast: 1.5
            // saturation: 1.2

        }
    }
}
profile
1인 개발

0개의 댓글