<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to create a drop shadow effect in Qt Quick]]></title><description><![CDATA[<p dir="auto">Hello guys. I can i make a drop shadow effect? I also tried Dropshadow{} but it doesnt work.</p>
<pre><code>import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Effects 1.15  // Für MultiEffect

ApplicationWindow {
    visible: true
    width: 300
    height: 200
    title: "Button mit MultiEffect Schatten"

    // Primärfarbe für Button-Hintergrund
    property color primaryColor: "#3498db"

    Button {
        id: button
        x: 100
        y: 75
        width: 48
        height: 48

        property alias imageSource: contentImage.source
        property alias backgroundColor: buttonBackground.color
        property bool showShadow: true  // Schatten standardmäßig an

        focusPolicy: Qt.NoFocus

        contentItem: Item {
            z: 2 // damit Image sichtbar bleibt
            anchors.fill: parent
            Image {
                id: contentImage
                anchors.centerIn: parent
                width: 24
                height: 24
                fillMode: Image.PreserveAspectFit
                source: "qrc:/icons/sample-icon.png"  // Beispielbild (bitte anpassen)
            }
        }

        background: Rectangle {
            id: buttonBackground
            anchors.fill: parent
            color: primaryColor
            radius: width / 2
            opacity: button.pressed ? 0.5 : 1.0
        }

        MultiEffect {
            anchors.fill: buttonBackground
            source: buttonBackground
            autoPaddingEnabled: true
            shadowEnabled: button.showShadow
            shadowBlur: 8.0
            shadowHorizontalOffset: 1
            shadowVerticalOffset: 3
            opacity: button.pressed ? 0.75 : 1.0
            radius: buttonBackground.radius
        }
    }
}

</code></pre>
]]></description><link>https://forum.qt.io/topic/162958/how-to-create-a-drop-shadow-effect-in-qt-quick</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 03:22:33 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/162958.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 10 Aug 2025 16:18:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to create a drop shadow effect in Qt Quick on Wed, 22 Oct 2025 01:56:21 GMT]]></title><description><![CDATA[<p dir="auto">Any update?</p>
]]></description><link>https://forum.qt.io/post/833033</link><guid isPermaLink="true">https://forum.qt.io/post/833033</guid><dc:creator><![CDATA[Tishat]]></dc:creator><pubDate>Wed, 22 Oct 2025 01:56:21 GMT</pubDate></item></channel></rss>