<?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[Adjust translation speed of QML DragHandler]]></title><description><![CDATA[<p dir="auto">My question is about using a QML <a href="https://doc.qt.io/qt-6/qml-qtquick-draghandler.html" target="_blank" rel="noopener noreferrer nofollow ugc">DragHandler</a> to move a QML Item. I have successfully implemented position through dragging (when holding the Ctrl modifier) like so:</p>
<pre><code>DragHandler {
    dragThreshold: 0
    acceptedModifiers: Qt.ControlModifier
}
</code></pre>
<p dir="auto">Now I would like to add another handler that allows me to precisely position the element. Other software does this throught the use of the shift modifier. So what I want to do is move the element not by the pixel amount that the mouse moves, but an amount smaller than that. Ideally I would want to do something like this:</p>
<pre><code>DragHandler {
    dragThreshold: 0
    acceptedModifiers: Qt.ShiftModifier

    onActiveTranslationChanged: {
        activeTranslation *= 0.5;
    }
}
</code></pre>
<p dir="auto">Unfortunatelly <code>activeTranslation</code> is read-only and I don't see any other property I could use and I can't think of any other way to do it... Does anybody have an idea how to acchive this?</p>
<p dir="auto">Thank you very much in advance!</p>
]]></description><link>https://forum.qt.io/topic/139292/adjust-translation-speed-of-qml-draghandler</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 16:08:21 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/139292.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 Sep 2022 20:41:34 GMT</pubDate><ttl>60</ttl></channel></rss>