<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									QML | ScrollView, ColumnLayout и MouseArea не работают вместе. - Разное				            </title>
            <link>https://microtechnics.ru/community/raznoe/qml-scrollview-columnlayout-i-mousearea-ne-rabotayut-vmeste/</link>
            <description>Обсуждение вопросов, посвященных программированию микроконтроллеров, разработке электроники и не только.</description>
            <language>ru-RU</language>
            <lastBuildDate>Mon, 15 Jun 2026 04:26:47 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>НА: QML | ScrollView, ColumnLayout и MouseArea не работают вместе.</title>
                        <link>https://microtechnics.ru/community/raznoe/qml-scrollview-columnlayout-i-mousearea-ne-rabotayut-vmeste/#post-602</link>
                        <pubDate>Sat, 06 Nov 2021 08:15:51 +0000</pubDate>
                        <description><![CDATA[@aveal только дошли руки попробовать, сработало) Снова благодарю)]]></description>
                        <content:encoded><![CDATA[<p>@aveal только дошли руки попробовать, сработало) Снова благодарю)</p>]]></content:encoded>
						                            <category domain="https://microtechnics.ru/community/raznoe/">Разное</category>                        <dc:creator>Dr.Dre</dc:creator>
                        <guid isPermaLink="true">https://microtechnics.ru/community/raznoe/qml-scrollview-columnlayout-i-mousearea-ne-rabotayut-vmeste/#post-602</guid>
                    </item>
				                    <item>
                        <title>НА: QML | ScrollView, ColumnLayout и MouseArea не работают вместе.</title>
                        <link>https://microtechnics.ru/community/raznoe/qml-scrollview-columnlayout-i-mousearea-ne-rabotayut-vmeste/#post-601</link>
                        <pubDate>Fri, 05 Nov 2021 08:56:58 +0000</pubDate>
                        <description><![CDATA[Привет, добавь
preventStealing: true
ко всем MouseArea:
MouseArea {
	anchors.fill: parent
	preventStealing: true

	onPositionChanged: {
		console.log(&#039;MouseArea - onPositionChanged -...]]></description>
                        <content:encoded><![CDATA[<p>Привет, добавь</p>
<pre contenteditable="false">preventStealing: true</pre>
<p>ко всем MouseArea:</p>
<pre contenteditable="false">MouseArea {
	anchors.fill: parent
	preventStealing: true

	onPositionChanged: {
		console.log('MouseArea - onPositionChanged - red', mouseX, mouseY)
	}
}</pre>]]></content:encoded>
						                            <category domain="https://microtechnics.ru/community/raznoe/">Разное</category>                        <dc:creator>Aveal</dc:creator>
                        <guid isPermaLink="true">https://microtechnics.ru/community/raznoe/qml-scrollview-columnlayout-i-mousearea-ne-rabotayut-vmeste/#post-601</guid>
                    </item>
				                    <item>
                        <title>QML | ScrollView, ColumnLayout и MouseArea не работают вместе.</title>
                        <link>https://microtechnics.ru/community/raznoe/qml-scrollview-columnlayout-i-mousearea-ne-rabotayut-vmeste/#post-600</link>
                        <pubDate>Thu, 04 Nov 2021 07:09:59 +0000</pubDate>
                        <description><![CDATA[Продолжаю мучать QML и мучаться сам ) Взял пример из документации ColumnLayout, все заработало (не удивительно). Добавил к блокам Rectangle MouseArea, тоже получилось без проблем. Далее реши...]]></description>
                        <content:encoded><![CDATA[<p>Продолжаю мучать QML и мучаться сам ) Взял пример из <a href="https://doc.qt.io/qt-5/qml-qtquick-layouts-columnlayout.html" target="_blank" rel="noopener">документации ColumnLayout</a>, все заработало (не удивительно). Добавил к блокам Rectangle MouseArea, тоже получилось без проблем. Далее решил попробовать ScrollView и вот тут начались проблемы... При перемещении указателя мыши в консоль приходят 5-10 сообщений и дальше перестают. Код получился такой:</p>
<pre contenteditable="false">W.Window {
    id: window
    width: 140
    height: 250
    visible: true

    ScrollView {
        clip: true
        anchors.fill: parent
        ScrollBar.vertical.policy: ScrollBar.AlwaysOn

        ColumnLayout{
            spacing: 2

            Rectangle {
                Layout.alignment: Qt.AlignCenter
                color: "red"
                Layout.preferredWidth: 80
                Layout.preferredHeight: 80

                MouseArea {
                    anchors.fill: parent

                    onPositionChanged: {
                        console.log('MouseArea - onPositionChanged - red', mouseX, mouseY)
                    }
                }
            }

            Rectangle {
                Layout.alignment: Qt.AlignRight
                color: "green"
                Layout.preferredWidth: 80
                Layout.preferredHeight: 140

                MouseArea {
                    anchors.fill: parent

                    onPositionChanged: {
                        console.log('MouseArea - onPositionChanged - green', mouseX, mouseY)
                    }
                }
            }

            Rectangle {
                Layout.alignment: Qt.AlignBottom
                Layout.fillHeight: true
                color: "blue"
                Layout.preferredWidth: 140
                Layout.preferredHeight: 80

                MouseArea {
                    anchors.fill: parent

                    onPositionChanged: {
                        console.log('MouseArea - onPositionChanged - blue', mouseX, mouseY)
                    }
                }
            }
        }
    }
}</pre>
<p>   Так вот выглядит окно приложения:</p>
87
<p>Сам по себе ScrollView работает правильно, но проблема точно в нем. Если убрать:</p>
<pre contenteditable="false">ScrollView {
	clip: true
	anchors.fill: parent
	ScrollBar.vertical.policy: ScrollBar.AlwaysOn</pre>
<p>То сообщения приходят как надо, без зависаний. При этом</p>
<pre contenteditable="false">ScrollBar.vertical.policy</pre>
<p>пробовал разные - не влияет никак вообще. Ну точнее влияет на работу прокрутки, но на проблему не влияет.</p>]]></content:encoded>
						                            <category domain="https://microtechnics.ru/community/raznoe/">Разное</category>                        <dc:creator>Dr.Dre</dc:creator>
                        <guid isPermaLink="true">https://microtechnics.ru/community/raznoe/qml-scrollview-columnlayout-i-mousearea-ne-rabotayut-vmeste/#post-600</guid>
                    </item>
							        </channel>
        </rss>
		