<?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 emit a keyspress signal ?]]></title><description><![CDATA[<p dir="auto">Hi there, I'm trying to emit a Keys.leftpressed signal after a mouse click.<br />
This is what I try.</p>
<pre><code>		MouseArea
		{
			anchors.fill: parent
			onClicked:
			{
				if (_state == 0)
				{
					Keys.leftPressed()
				}
			}
		}
</code></pre>
<p dir="auto">But Keys.leftPressed require a argument.<br />
I try this</p>
<pre><code>		MouseArea
		{
			property KeyEvent _event
			anchors.fill: parent
			onClicked:
			{
				if (_state == 0)
				{
					Keys.leftPressed(_event)
				}
			}
		}
</code></pre>
<p dir="auto">And I got an error: "KeyEvent is not a type"</p>
<p dir="auto">What I have to do now?</p>
]]></description><link>https://forum.qt.io/topic/128038/how-to-emit-a-keyspress-signal</link><generator>RSS for Node</generator><lastBuildDate>Tue, 11 Aug 2026 23:24:24 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/128038.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 29 Jun 2021 17:48:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to emit a keyspress signal ? on Wed, 30 Jun 2021 16:20:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/6thc">@<bdi>6thC</bdi></a><br />
Because I'm using PC and wanna test the Gestures.<br />
I want to emit a "Pinch" signal by using the wheel on mouse.</p>
]]></description><link>https://forum.qt.io/post/668121</link><guid isPermaLink="true">https://forum.qt.io/post/668121</guid><dc:creator><![CDATA[VoLinhTruc]]></dc:creator><pubDate>Wed, 30 Jun 2021 16:20:16 GMT</pubDate></item><item><title><![CDATA[Reply to How to emit a keyspress signal ? on Wed, 30 Jun 2021 02:17:42 GMT]]></title><description><![CDATA[<p dir="auto">What. Why? You're (IMO) making this way too hard on yourself.</p>
<p dir="auto">Bind both left pressed &amp; mouse click to the same &lt;signal | action&gt; - keep it simple.<br />
Don't try remote control calling things as you do, that's just going to hurt you 2*, now and in the future.</p>
]]></description><link>https://forum.qt.io/post/668029</link><guid isPermaLink="true">https://forum.qt.io/post/668029</guid><dc:creator><![CDATA[6thC]]></dc:creator><pubDate>Wed, 30 Jun 2021 02:17:42 GMT</pubDate></item></channel></rss>