<?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[PyQt, after app quit, my command line is unresponsive]]></title><description><![CDATA[<p dir="auto">Hi, I have some weird behaviour that I can not understand.<br />
I run this code "python3 <a href="http://ToonPi.py" target="_blank" rel="noopener noreferrer nofollow ugc">ToonPi.py</a>" from my Raspberry Pi command line.<br />
This generates a screen with picture and button using PyQt5 and Qt5.5. When I click the button the app quits, so far so good.<br />
However, from that point on my command line no longer works and I can not see the blinking line which I<br />
normally see when I want to type something in. I have to reboot my RPi to try again.<br />
Anyone have any idea on this?</p>
<p dir="auto">Below are both the py file and the QML file.<br />
QML File</p>
<pre><code>import QtQuick 2.3
import QtQuick.Controls 1.4

ApplicationWindow {
    id: window
    visible: true
	width: 800; height: 480

	Rectangle {
		id: screen
		width: 800; height: 480

		SystemPalette { id: activePalette }

		Item {
			width: parent.width
			anchors { top: parent.top; bottom: toolBar.top }

			Image {
				id: background
				anchors.fill: parent
				source: "./pics/toonback.png"
				fillMode: Image.PreserveAspectCrop
			}
		}

		Button{
			x: 100
			y: 100
			text : "Quit"
			onClicked: {
				Qt.quit()
			}
		}
		
		Rectangle {
			id: toolBar
			width: parent.width; height: 30
			color: activePalette.window
			anchors.bottom: screen.bottom


			Text {
				id: score
				anchors { right: parent.right; verticalCenter: parent.verticalCenter }
				text: "Score: Who knows?"
			}
		}
		
	}
}
</code></pre>
<p dir="auto">And the Python file</p>
<pre><code>import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.QtQml import QQmlApplicationEngine


def main():

    engine = QQmlApplicationEngine("basic.qml")
    engine.quit.connect(myApp.quit)

    # Execute the Application and Exit
    myApp.exec_()

# Main Function
if __name__ == '__main__':
    # Create main app
    myApp = QApplication(sys.argv)
    sys.exit(main())
</code></pre>
]]></description><link>https://forum.qt.io/topic/62610/pyqt-after-app-quit-my-command-line-is-unresponsive</link><generator>RSS for Node</generator><lastBuildDate>Sun, 09 Aug 2026 04:15:31 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/62610.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 12 Jan 2016 20:57:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to PyQt, after app quit, my command line is unresponsive on Fri, 15 Jan 2016 00:20:33 GMT]]></title><description><![CDATA[<p dir="auto">Perhaps because you are not returning the value. There's no return.</p>
<p dir="auto">Did you try adding</p>
<pre><code>return myApp.exec_()
</code></pre>
<p dir="auto">exec_() will return an integer. (usually 0)</p>
]]></description><link>https://forum.qt.io/post/307516</link><guid isPermaLink="true">https://forum.qt.io/post/307516</guid><dc:creator><![CDATA[David.G]]></dc:creator><pubDate>Fri, 15 Jan 2016 00:20:33 GMT</pubDate></item><item><title><![CDATA[Reply to PyQt, after app quit, my command line is unresponsive on Thu, 14 Jan 2016 20:33:02 GMT]]></title><description><![CDATA[<p dir="auto">You mean reboot? After reboot its fine.<br />
What do you mean by reset or clear?</p>
]]></description><link>https://forum.qt.io/post/307450</link><guid isPermaLink="true">https://forum.qt.io/post/307450</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Thu, 14 Jan 2016 20:33:02 GMT</pubDate></item><item><title><![CDATA[Reply to PyQt, after app quit, my command line is unresponsive on Tue, 12 Jan 2016 23:16:24 GMT]]></title><description><![CDATA[<p dir="auto">hello,<br />
So reset or clear wont make it "blink" again?</p>
]]></description><link>https://forum.qt.io/post/306998</link><guid isPermaLink="true">https://forum.qt.io/post/306998</guid><dc:creator><![CDATA[Metavoid]]></dc:creator><pubDate>Tue, 12 Jan 2016 23:16:24 GMT</pubDate></item></channel></rss>