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.7 6.6 6.5 Change-Id: I27c11ed013880978656f86b6322bf3e4bfa18812 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
parent
ac7754b7f7
commit
a95df6a234
|
@ -77,7 +77,7 @@
|
||||||
\code
|
\code
|
||||||
// +Material/CustomButton.qml
|
// +Material/CustomButton.qml
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtGraphicalEffects
|
import QtQuick.Effects
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Controls.Material
|
import QtQuick.Controls.Material
|
||||||
|
|
||||||
|
@ -93,11 +93,12 @@
|
||||||
radius: width / 2
|
radius: width / 2
|
||||||
|
|
||||||
layer.enabled: control.enabled
|
layer.enabled: control.enabled
|
||||||
layer.effect: DropShadow {
|
layer.effect: MultiEffect {
|
||||||
verticalOffset: 1
|
shadowEnabled: true
|
||||||
color: Material.dropShadowColor
|
shadowHorizontalOffset: 3
|
||||||
samples: control.pressed ? 20 : 10
|
shadowVerticalOffset: 3
|
||||||
spread: 0.5
|
shadowColor: Material.dropShadowColor
|
||||||
|
shadowBlur: control.pressed ? 0.8 : 0.4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue