<?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[Jog Pushbuttons Like Bind in Tkinter]]></title><description><![CDATA[<p dir="auto">I'm to create robot jog pushbuttons that once a PB is pressed will start a function (jog X+) and once the PB is released, will cause a stopjog function. I've tried using .pressed and .released (ref below) but those calls do not work. Any ideas on how to bind the function like in tkinter?</p>
<pre><code>    # Check for Coords Jog pushbuttons
    if self.pushButton_Xplus.pressed:self.move_jog(text="X+")
    if self.pushButton_Xplus.released: self.move_stop
</code></pre>
]]></description><link>https://forum.qt.io/topic/142950/jog-pushbuttons-like-bind-in-tkinter</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Apr 2026 04:16:57 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/142950.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Feb 2023 00:28:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Jog Pushbuttons Like Bind in Tkinter on Thu, 16 Feb 2023 10:09:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pinks32">@<bdi>Pinks32</bdi></a> said in <a href="/post/747873">Jog Pushbuttons Like Bind in Tkinter</a>:</p>
<blockquote>
<p dir="auto">The jog &amp; jog stop functions have worked w/tkinter so I'm ruling out the functions as any issue. Ideas?</p>
</blockquote>
<blockquote>
<p dir="auto">There was a tkinter remanent left over in the move_stop module. Once removed, Now my jog PB's work as expected!</p>
</blockquote>
<p dir="auto">:)</p>
<p dir="auto">Don't make assumptions.  Put in debug messages.</p>
]]></description><link>https://forum.qt.io/post/747919</link><guid isPermaLink="true">https://forum.qt.io/post/747919</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 16 Feb 2023 10:09:56 GMT</pubDate></item><item><title><![CDATA[Reply to Jog Pushbuttons Like Bind in Tkinter on Thu, 16 Feb 2023 09:51:24 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the advice. Placed print() statements in both move_jog &amp; move_stop and sure enough move_stop was not getting called. There was a tkinter remanent left over in the move_stop module. Once removed, Now my jog PB's work as expected! Thanks again! Onto the next issue...</p>
]]></description><link>https://forum.qt.io/post/747916</link><guid isPermaLink="true">https://forum.qt.io/post/747916</guid><dc:creator><![CDATA[Pinks32]]></dc:creator><pubDate>Thu, 16 Feb 2023 09:51:24 GMT</pubDate></item><item><title><![CDATA[Reply to Jog Pushbuttons Like Bind in Tkinter on Thu, 16 Feb 2023 08:56:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pinks32">@<bdi>Pinks32</bdi></a><br />
As <a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> asks, have you checked by connecting a <code>print()</code> statement lambda to the signal to verify whether it ever gets called?</p>
]]></description><link>https://forum.qt.io/post/747906</link><guid isPermaLink="true">https://forum.qt.io/post/747906</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 16 Feb 2023 08:56:04 GMT</pubDate></item><item><title><![CDATA[Reply to Jog Pushbuttons Like Bind in Tkinter on Thu, 16 Feb 2023 05:18:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pinks32">@<bdi>Pinks32</bdi></a> said in <a href="/post/747873">Jog Pushbuttons Like Bind in Tkinter</a>:</p>
<blockquote>
<p dir="auto">but the .released function doesn't work as expected</p>
</blockquote>
<p dir="auto">You mean self.move_stop is never called?</p>
]]></description><link>https://forum.qt.io/post/747876</link><guid isPermaLink="true">https://forum.qt.io/post/747876</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Thu, 16 Feb 2023 05:18:10 GMT</pubDate></item><item><title><![CDATA[Reply to Jog Pushbuttons Like Bind in Tkinter on Thu, 16 Feb 2023 03:29:27 GMT]]></title><description><![CDATA[<p dir="auto">Thanks. I changed code to reflect a connect:<br />
self.pushButton_J1plus.pressed.connect(lambda event:self.move_jog(text="J1+"))<br />
self.pushButton_J1plus.released.connect(self.move_stop)</p>
<p dir="auto">Seems the .pressed works ok, but the .released function doesn't work as expected, and doesn't get called. The jog &amp; jog stop functions have worked w/tkinter so I'm ruling out the functions as any issue. Ideas?</p>
]]></description><link>https://forum.qt.io/post/747873</link><guid isPermaLink="true">https://forum.qt.io/post/747873</guid><dc:creator><![CDATA[Pinks32]]></dc:creator><pubDate>Thu, 16 Feb 2023 03:29:27 GMT</pubDate></item><item><title><![CDATA[Reply to Jog Pushbuttons Like Bind in Tkinter on Wed, 15 Feb 2023 21:03:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pinks32">@<bdi>Pinks32</bdi></a><br />
<code>QPushButton.pressed</code>/<code>released</code> are <em>signals</em>, needing to be <code>connect()</code>ed.  In the code you show you are using them as though they were variables.</p>
]]></description><link>https://forum.qt.io/post/747846</link><guid isPermaLink="true">https://forum.qt.io/post/747846</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Wed, 15 Feb 2023 21:03:02 GMT</pubDate></item><item><title><![CDATA[Reply to Jog Pushbuttons Like Bind in Tkinter on Wed, 15 Feb 2023 20:49:31 GMT]]></title><description><![CDATA[<p dir="auto">Thanks! I've done that on other PB's where only clicked is required. Here I want to run func:  move_jog() when the PB is held down continuously and then run stop_jog() when that same PB is released after being pushed. The two lines of code above don't work, i.e. the .pressed does not start the move_jog() func.</p>
]]></description><link>https://forum.qt.io/post/747844</link><guid isPermaLink="true">https://forum.qt.io/post/747844</guid><dc:creator><![CDATA[Pinks32]]></dc:creator><pubDate>Wed, 15 Feb 2023 20:49:31 GMT</pubDate></item><item><title><![CDATA[Reply to Jog Pushbuttons Like Bind in Tkinter on Wed, 15 Feb 2023 08:12:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pinks32">@<bdi>Pinks32</bdi></a> Please read <a href="https://wiki.qt.io/Qt_for_Python_Signals_and_Slots" target="_blank" rel="noopener noreferrer nofollow ugc">https://wiki.qt.io/Qt_for_Python_Signals_and_Slots</a><br />
There is an example how to connect a function to a signal:</p>
<pre><code>import sys
from PySide2.QtWidgets import QApplication, QPushButton

def func():
 print("func has been called!")

app = QApplication(sys.argv)
button = QPushButton("Call func")
button.clicked.connect(func)
button.show()
sys.exit(app.exec_())
</code></pre>
]]></description><link>https://forum.qt.io/post/747686</link><guid isPermaLink="true">https://forum.qt.io/post/747686</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Wed, 15 Feb 2023 08:12:14 GMT</pubDate></item></channel></rss>