Doc: Replace Qt 5 QtGraphicalEffects code snippet with Qt 6 MultiEffect
Qt Graphical Effects was deprecated in Qt 6 and replaced with the MultiEffect type. Fix code snippets in Qt 6 documentation to use the MultiEffect QML type instead of the deprecated Qt Graphical Effects type. Fixes: QTBUG-119992 Pick-to: 6.5 Change-Id: I27c11ed013880978656f86b6322bf3e4bfa18812 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commita95df6a234
) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit134261baf9
)
This commit is contained in:
parent
4dd42a7de9
commit
22b81f1bb8
|
@ -77,7 +77,7 @@
|
|||
\code
|
||||
// +Material/CustomButton.qml
|
||||
import QtQuick
|
||||
import QtGraphicalEffects
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
|
@ -93,11 +93,12 @@
|
|||
radius: width / 2
|
||||
|
||||
layer.enabled: control.enabled
|
||||
layer.effect: DropShadow {
|
||||
verticalOffset: 1
|
||||
color: Material.dropShadowColor
|
||||
samples: control.pressed ? 20 : 10
|
||||
spread: 0.5
|
||||
layer.effect: MultiEffect {
|
||||
shadowEnabled: true
|
||||
shadowHorizontalOffset: 3
|
||||
shadowVerticalOffset: 3
|
||||
shadowColor: Material.dropShadowColor
|
||||
shadowBlur: control.pressed ? 0.8 : 0.4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue