<?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[Setting size of terminal spawned by QProcess]]></title><description><![CDATA[<p dir="auto">I am writing a widget that displays a terminal emulator within my programm</p>
<pre><code>class EmbeddedTerminal(QWidget):
    finished = pyqtSignal()

    def __init__(self, parent=None):
        super(EmbeddedTerminal, self).__init__(parent)
        self.process = QProcess(self)
        self.process.finished.connect(self.term_finished)
        self.terminal = QWidget(self)
        layout = QVBoxLayout(self)
        layout.addWidget(self.terminal)
        self.process.start('alacritty', ['--embed', str(int(self.winId()))])

    @pyqtSlot()
    def term_finished(self):
        self.finished.emit()
</code></pre>
<p dir="auto">When I start this widget, the terminal is always 640x480 pixels, but I want it do take as much space as possible. As far as I can tell there should be two ways<br />
First, the Layout should tell the Process to take the space (preferred way, but I don't know how).<br />
Second, I need the width and height in pixels of the available space, to calculate the dimensions of the terminal by hand and give it as a parameter in process.start().</p>
<p dir="auto">I really don't want to have to resort to the second option. Any suggestions on how to solve the issue? Maybe something completely different I did not think of?</p>
<p dir="auto">Thanks in advance!</p>
]]></description><link>https://forum.qt.io/topic/115149/setting-size-of-terminal-spawned-by-qprocess</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Mar 2026 17:28:49 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/115149.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 24 May 2020 22:19:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Setting size of terminal spawned by QProcess on Mon, 25 May 2020 15:01:52 GMT]]></title><description><![CDATA[<p dir="auto">Changing self.winID() to self.terminal.winID() does not change the behaviour of the terminal unfortunately.</p>
]]></description><link>https://forum.qt.io/post/596775</link><guid isPermaLink="true">https://forum.qt.io/post/596775</guid><dc:creator><![CDATA[julkip]]></dc:creator><pubDate>Mon, 25 May 2020 15:01:52 GMT</pubDate></item><item><title><![CDATA[Reply to Setting size of terminal spawned by QProcess on Mon, 25 May 2020 05:26:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/julkip">@<bdi>julkip</bdi></a> said in <a href="/post/596603">Setting size of terminal spawned by QProcess</a>:</p>
<blockquote>
<p dir="auto">self.process.start('alacritty', ['--embed', str(int(self.winId()))])</p>
</blockquote>
<p dir="auto">You are providing the winId from your EmbeddedTerminal widget, not self.terminal inside EmbeddedTerminal.</p>
]]></description><link>https://forum.qt.io/post/596622</link><guid isPermaLink="true">https://forum.qt.io/post/596622</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Mon, 25 May 2020 05:26:55 GMT</pubDate></item></channel></rss>