<?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[Emulating command console]]></title><description><![CDATA[<p dir="auto">I want it to be like the windows cmd, you write a command and then it gives back information but you cant edit what already is writed, you can only edit the text that you are introducing for the next command and i dont know how to do that. Well thanks and any idea is welcome!</p>
<p dir="auto">-Noele1995</p>
]]></description><link>https://forum.qt.io/topic/31134/emulating-command-console</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 05:51:01 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/31134.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 24 Aug 2013 21:46:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Emulating command console on Mon, 26 Aug 2013 14:32:05 GMT]]></title><description><![CDATA[<p dir="auto">Have a look at <em>QLineEdit::setCompleter()</em> and at QCompleter.</p>
<p dir="auto">@QStringList wordList;<br />
wordList &lt;&lt; "alpha" &lt;&lt; "omega" &lt;&lt; "omicron" &lt;&lt; "zeta";</p>
<p dir="auto">QLineEdit *lineEdit = new QLineEdit(this);</p>
<p dir="auto">QCompleter *completer = new QCompleter(wordList, this);<br />
completer-&gt;setCaseSensitivity(Qt::CaseInsensitive);<br />
lineEdit-&gt;setCompleter(completer);@</p>
<p dir="auto">The "wordList" would simply be the list of recently used commands.</p>
<p dir="auto">--</p>
<p dir="auto">Also check the available QCompleter::CompletionMode values!</p>
]]></description><link>https://forum.qt.io/post/192631</link><guid isPermaLink="true">https://forum.qt.io/post/192631</guid><dc:creator><![CDATA[MuldeR]]></dc:creator><pubDate>Mon, 26 Aug 2013 14:32:05 GMT</pubDate></item><item><title><![CDATA[Reply to Emulating command console on Mon, 26 Aug 2013 14:29:13 GMT]]></title><description><![CDATA[<p dir="auto">How can i make in the QLineEdit that if i prees up arrow it shows me the last command i wrote there?</p>
]]></description><link>https://forum.qt.io/post/192630</link><guid isPermaLink="true">https://forum.qt.io/post/192630</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Mon, 26 Aug 2013 14:29:13 GMT</pubDate></item><item><title><![CDATA[Reply to Emulating command console on Sun, 25 Aug 2013 17:29:06 GMT]]></title><description><![CDATA[<p dir="auto">Yes i know to do that, actually thats what i did, but i wanted that window to look like it had a console inside of it but it woked fine.</p>
]]></description><link>https://forum.qt.io/post/192483</link><guid isPermaLink="true">https://forum.qt.io/post/192483</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sun, 25 Aug 2013 17:29:06 GMT</pubDate></item><item><title><![CDATA[Reply to Emulating command console on Sun, 25 Aug 2013 11:31:38 GMT]]></title><description><![CDATA[<p dir="auto">[quote author="Seamus Boyle" date="1377418770"]Subclass QPlainTextEdit or QTextEdit and handle key press events yourself; up key for command history, enter for line execute, and so on.[/quote]</p>
<p dir="auto">Should <em>not</em> be required, I think.</p>
<p dir="auto">Just connect a signal to QLineEdit::retrunPressed(). This will tell you when the user has typed a new command into the LineEdit. Then just do whatever needs to be done and append the desired output (logging) into the QPlainTextEdit. For details see "Signals and Slots":<a href="http://qt-project.org/doc/qt-4.8/signalsandslots.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/doc/qt-4.8/signalsandslots.html</a></p>
]]></description><link>https://forum.qt.io/post/192467</link><guid isPermaLink="true">https://forum.qt.io/post/192467</guid><dc:creator><![CDATA[MuldeR]]></dc:creator><pubDate>Sun, 25 Aug 2013 11:31:38 GMT</pubDate></item><item><title><![CDATA[Reply to Emulating command console on Sun, 25 Aug 2013 10:58:27 GMT]]></title><description><![CDATA[<p dir="auto">That was my first option but i dont really know how to do that.</p>
]]></description><link>https://forum.qt.io/post/192466</link><guid isPermaLink="true">https://forum.qt.io/post/192466</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sun, 25 Aug 2013 10:58:27 GMT</pubDate></item><item><title><![CDATA[Reply to Emulating command console on Sun, 25 Aug 2013 08:19:30 GMT]]></title><description><![CDATA[<p dir="auto">Subclass QPlainTextEdit or QTextEdit and handle key press events yourself; up key for command history, enter for line execute, and so on.</p>
]]></description><link>https://forum.qt.io/post/192460</link><guid isPermaLink="true">https://forum.qt.io/post/192460</guid><dc:creator><![CDATA[Seamus Boyle]]></dc:creator><pubDate>Sun, 25 Aug 2013 08:19:30 GMT</pubDate></item><item><title><![CDATA[Reply to Emulating command console on Sun, 25 Aug 2013 01:44:08 GMT]]></title><description><![CDATA[<p dir="auto">Create a new QDialog, insert a Vertical Layout and then put a QPlainTextEdit on top plus a QLineEdit on the bottom. Make the QPlainTextEdit read-only.</p>
]]></description><link>https://forum.qt.io/post/192447</link><guid isPermaLink="true">https://forum.qt.io/post/192447</guid><dc:creator><![CDATA[MuldeR]]></dc:creator><pubDate>Sun, 25 Aug 2013 01:44:08 GMT</pubDate></item></channel></rss>