<?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[Qt6.5 QML Layout not working well in Linux]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">When I moved from Qt5 to Qt6 I found an issue with the Layout in QML.</p>
<p dir="auto">One of the items in the RowLayout needs to fill the available space, so it has <strong>Layout.fillWidth: true</strong><br />
But, instead of respecting the other items, it resized on top of the others. Strangely, when I manually resize the window (draging one of the borders) the layout is adjusted and it shows as it should be.</p>
<p dir="auto">It seems that the triggering of Layout adjustment is missing in Qt6.</p>
<p dir="auto"><strong>Snipet of the code:</strong></p>
<pre><code>RowLayout {
                    Button {
                        id: id_buttonBrowseFrom
                        Layout.preferredWidth: id_labelRef.width*8
                       ...
                    }
                    Button {
                        id: id_buttonSshFrom
                        Layout.preferredWidth: id_labelRef.width*8
                       ...
                    }
                    Rectangle {
                        id: id_rectFrom
                        Layout.preferredWidth: id_labelRef.width*10
                       ...
                    }
                    TextField {
                        id: id_fieldFrom
                        Layout.fillWidth: true
                        ...
                    }
                }
</code></pre>
<p dir="auto">Screenshot of how it looks when the application starts:</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/f7c25ad5-4623-41b4-85fe-dbdfca9c552f.png" alt="Screenshot from 2023-04-06 14-47-38.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Screenshot of how it looks when I resize the window and adjusts automatically:</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/f9403f9f-b72c-4411-a392-db25ec138904.png" alt="Screenshot from 2023-04-06 14-47-49.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/topic/144164/qt6-5-qml-layout-not-working-well-in-linux</link><generator>RSS for Node</generator><lastBuildDate>Sat, 24 Oct 2026 16:06:45 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/144164.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 06 Apr 2023 04:52:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Qt6.5 QML Layout not working well in Linux on Thu, 06 Apr 2023 07:52:43 GMT]]></title><description><![CDATA[<p dir="auto">Maybe related to <a href="https://bugreports.qt.io/browse/QTBUG-93631" target="_blank" rel="noopener noreferrer nofollow ugc">https://bugreports.qt.io/browse/QTBUG-93631</a>?</p>
]]></description><link>https://forum.qt.io/post/753840</link><guid isPermaLink="true">https://forum.qt.io/post/753840</guid><dc:creator><![CDATA[Asperamanca]]></dc:creator><pubDate>Thu, 06 Apr 2023 07:52:43 GMT</pubDate></item></channel></rss>