<?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[button click  goes through the items ..]]></title><description><![CDATA[<p dir="auto">hi,</p>
<p dir="auto">Can please someone help me to understand and solve this issue ?</p>
<pre><code>import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12

Window {
    visible: true
    width: 640
    height: 480
    title: qsTr("Hello World")
    MouseArea{
        anchors.fill: parent
        onClicked: {
            console.log("main area clicked")
        }
    }
    Rectangle{  // click this rectangle will output "main area clicked"
        anchors.centerIn: parent
        height: parent.height *0.8
        width: parent.width *0.8
        color : "orange"
        RowLayout{
            anchors.fill: parent
            spacing: 30
            Button{
                Layout.fillHeight: true
                Layout.fillWidth: true
                text: "clickme"
                onClicked: {
                    console.log("btn 1 click")
                }
            }
            Button{ // click this disabled Button will output "main area clicked"
                Layout.fillHeight: true
                Layout.fillWidth: true
                text: "clickme"
                enabled: false
                onClicked: {
                    console.log("btn 2 click")
                }
            }
        }
    }
}
</code></pre>
]]></description><link>https://forum.qt.io/topic/104899/button-click-goes-through-the-items</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 22:06:54 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/104899.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 12 Jul 2019 09:40:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to button click  goes through the items .. on Fri, 12 Jul 2019 19:00:52 GMT]]></title><description><![CDATA[<p dir="auto">Rectangle is transparent to mouse events, so it lets your click through. Add a mouse area inside it to stop the event from propagating.</p>
<p dir="auto">Disabled button - same story, it's disabled so it will likely pass the event further.</p>
<p dir="auto">I haven't tested this, so it's a bit of a guess.</p>
]]></description><link>https://forum.qt.io/post/540561</link><guid isPermaLink="true">https://forum.qt.io/post/540561</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Fri, 12 Jul 2019 19:00:52 GMT</pubDate></item></channel></rss>