<?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[Vertical spacer doesn&#x27;t work after latest update]]></title><description><![CDATA[<p dir="auto">I use Ubuntu 20.04 and  just updated Qt Creator and sdk yesterday and after that vertical spacers in my projects doesn't work correctly but in designer it looks fine.</p>
<p dir="auto">.ui file:</p>
<pre><code>&lt;spacer name="verticalSpacer_4"&gt;
 &lt;property name="orientation"&gt;
  &lt;enum&gt;Qt::Orientation::Vertical&lt;/enum&gt;
  &lt;/property&gt;
  &lt;property name="sizeHint" stdset="0"&gt;
   &lt;size&gt;
    &lt;width&gt;20&lt;/width&gt;
    &lt;height&gt;40&lt;/height&gt;
   &lt;/size&gt;
  &lt;/property&gt;
&lt;/spacer&gt;
</code></pre>
<p dir="auto">generated _ui.h file:</p>
<pre><code>QSpacerItem *verticalSpacer_4;

verticalSpacer_4 = new QSpacerItem(20, 40, QSizePolicy::Expanding, QSizePolicy::Minimum);
MainScreenMenuBar-&gt;addItem(verticalSpacer_4);
</code></pre>
<p dir="auto">designer and built view:<br />
<img src="https://ddgobkiprc33d.cloudfront.net/23f22fa0-f66b-4a27-beec-975de3932f7f.png" alt="Screenshot from 2024-08-05 15-55-37.png" class=" img-fluid img-markdown" /> <img src="https://ddgobkiprc33d.cloudfront.net/f82b19e0-4954-48f0-a33c-17fbba058233.png" alt="Screenshot from 2024-08-05 15-56-04.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I also tested in new projects with Qt5 and Qt6 but the results were still same and disabling style didn't change anything.</p>
<p dir="auto">Only change was in .pro file, i added "QMAKE_CFLAGS_ISYSTEM = -I " because i got "stdlib.h: No such file or directory" from compiler and it does not build the project without it.</p>
]]></description><link>https://forum.qt.io/topic/158064/vertical-spacer-doesn-t-work-after-latest-update</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 12:23:32 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/158064.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 05 Aug 2024 13:18:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Tue, 17 Sep 2024 09:16:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> Thank you, I didn't want to run the installer, simply start a "standalone" version (to not break Qt Creator installed from Qt Maintenance Tool still useful for Qt 6 projects), so I used this one : <a href="https://download.qt.io/official_releases/qtcreator/13.0/13.0.2/installer_source/linux_x64/" target="_blank" rel="noopener noreferrer nofollow ugc">https://download.qt.io/official_releases/qtcreator/13.0/13.0.2/installer_source/linux_x64/</a></p>
<p dir="auto">Thank you for your help, this fixed my issue, I can continue to maintain 5.15.x projects :)</p>
]]></description><link>https://forum.qt.io/post/809745</link><guid isPermaLink="true">https://forum.qt.io/post/809745</guid><dc:creator><![CDATA[legerborea]]></dc:creator><pubDate>Tue, 17 Sep 2024 09:16:42 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Tue, 17 Sep 2024 08:58:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/legerborea">@<bdi>legerborea</bdi></a> said in <a href="/post/809738">Vertical spacer doesn't work after latest update</a>:</p>
<blockquote>
<p dir="auto">I will try to build it from sources from the link you gave me</p>
</blockquote>
<p dir="auto">You don't have to build from source - there are also binaries for Windows, Linux and MacOS</p>
]]></description><link>https://forum.qt.io/post/809743</link><guid isPermaLink="true">https://forum.qt.io/post/809743</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Tue, 17 Sep 2024 08:58:45 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Tue, 17 Sep 2024 08:42:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> Hello, thank you for your answer, I have tried the checkbox "archives" but this only allow for old "kits", not old "qt creator" versions (see picture below).<br />
I will try to build it from sources from the link you gave me, thank you.</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/6897edf3-fb4d-4579-933d-f7d6f9585598.png" alt="Capture d’écran du 2024-09-17 10-36-39.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/809738</link><guid isPermaLink="true">https://forum.qt.io/post/809738</guid><dc:creator><![CDATA[legerborea]]></dc:creator><pubDate>Tue, 17 Sep 2024 08:42:39 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Tue, 17 Sep 2024 08:14:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/legerborea">@<bdi>legerborea</bdi></a> said in <a href="/post/809729">Vertical spacer doesn't work after latest update</a>:</p>
<blockquote>
<p dir="auto">Qt MaintenanceTool doesn't provide a way to go back to a previous version</p>
</blockquote>
<p dir="auto">There should be "Archive" check boy (not sure what exact text is shown there) to activate older versions.<br />
But you can also download from <a href="https://download.qt.io/archive/qtcreator/" target="_blank" rel="noopener noreferrer nofollow ugc">https://download.qt.io/archive/qtcreator/</a></p>
]]></description><link>https://forum.qt.io/post/809733</link><guid isPermaLink="true">https://forum.qt.io/post/809733</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Tue, 17 Sep 2024 08:14:07 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Tue, 17 Sep 2024 07:58:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> Hello,<br />
You said to not use this version of the Designer for Qt5 projects but how do we go back to a previous QtCreator version ? (I have the exact same issue, designer view is fine but once built, spacer doesn't behave the same)<br />
Qt MaintenanceTool doesn't provide a way to go back to a previous version and I can't find a parameter to set the designer version... (We are still stuck to Qt5.15 due to missing features in the Qt6 version)</p>
<p dir="auto">Any help will be appreciated</p>
]]></description><link>https://forum.qt.io/post/809729</link><guid isPermaLink="true">https://forum.qt.io/post/809729</guid><dc:creator><![CDATA[legerborea]]></dc:creator><pubDate>Tue, 17 Sep 2024 07:58:33 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Tue, 06 Aug 2024 12:02:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> said in <a href="/post/806670">Vertical spacer doesn't work after latest update</a>:</p>
<blockquote>
<p dir="auto">Now immediately after the call in your code to setupUi() append code to change it to whatever is needed for Qt5. You might do that at compile-time with a hard-coded replacement by enclosing inside some #ifdef Qt5 ... #endif or at runtime via some if (qt_version() == Qt5). In the latter case you could read the current spacer size policy properties and set them back in swapped order: this could be used if you have other spacers which need changing. I think either of these approaches can be done, you'll have to search docs or ask for the correct symbol/function/variable to use for these tests.</p>
</blockquote>
<p dir="auto">Thank you, this solves the issue for now.</p>
]]></description><link>https://forum.qt.io/post/806701</link><guid isPermaLink="true">https://forum.qt.io/post/806701</guid><dc:creator><![CDATA[Ali-SZ]]></dc:creator><pubDate>Tue, 06 Aug 2024 12:02:37 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Tue, 06 Aug 2024 07:35:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ali-sz">@<bdi>Ali-SZ</bdi></a> said in <a href="/post/806666">Vertical spacer doesn't work after latest update</a>:</p>
<blockquote>
<p dir="auto">For Qt5, i realised changing following code in generated ui_....h file:</p>
</blockquote>
<p dir="auto">Yes, but you have a problem: the <code>ui_....h</code> file is regenerated/overwritten any/every time you make any change to the <code>.ui</code> file, or if if you rebuild from clean.  Sooner or later this is going to bite you on your bottom!</p>
<p dir="auto">I think you have been told that you should not be using that version of <strong>Designer</strong> for Qt5.  You should consider this carefully, as there may (well) be other items which will "go wrong" but may be hard to spot.</p>
<p dir="auto">If you are determined to continue with a recent version of <strong>Creator</strong> even for an old Qt5.  I would look at leaving whatever line is generated into <code>ui_....h</code> file as-is, because of regeneration.  Have a look in <code>ui_....h</code> to see how you can access the variable for the spacer, I think it will be <code>ui-&gt;verticalSpacer</code> if you have named the widget.</p>
<p dir="auto">Now immediately after the call in your code to <code>setupUi()</code> append code to change it to whatever is needed for Qt5.  You might do that at compile-time with a hard-coded replacement by enclosing inside some <code>#ifdef Qt5 ... #endif</code> or at runtime via some <code>if (qt_version() == Qt5)</code>.  In the latter case you could read the current spacer size policy properties and set them back in swapped order: this could be used if you have other spacers which need changing.  I think either of these approaches can be done, you'll have to search docs or ask for the correct symbol/function/variable to use for these tests.</p>
]]></description><link>https://forum.qt.io/post/806670</link><guid isPermaLink="true">https://forum.qt.io/post/806670</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Tue, 06 Aug 2024 07:35:58 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Tue, 06 Aug 2024 07:04:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/friedemannkleint">@<bdi>friedemannkleint</bdi></a><br />
First thank you for help and i apologise if i made any confusion.</p>
<p dir="auto">So i updated Qt6 to 6.7.2 and Qt5 to 5.15.2 and created fresh Qt6 and Qt5 projects for test, the issue with Qt6 is gone but i still have this issue for Qt5.<br />
For Qt5, i realised changing following code in generated ui_....h file:</p>
<pre><code>verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Expanding, QSizePolicy::Minimum);
</code></pre>
<p dir="auto">to this:</p>
<pre><code>verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
</code></pre>
<p dir="auto">Will fix the issue.</p>
]]></description><link>https://forum.qt.io/post/806666</link><guid isPermaLink="true">https://forum.qt.io/post/806666</guid><dc:creator><![CDATA[Ali-SZ]]></dc:creator><pubDate>Tue, 06 Aug 2024 07:04:17 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Tue, 06 Aug 2024 05:46:35 GMT]]></title><description><![CDATA[<p dir="auto">Qt Designer 6.7 writes fully qualified enumeration values to support scoped enums and Qt for Python (see <a href="https://lists.qt-project.org/pipermail/development/2023-November/044620.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://lists.qt-project.org/pipermail/development/2023-November/044620.html</a> ). This is supported in 6.6/6.5.4/6.2.13.</p>
<p dir="auto">We got several reports that Qt Widgets Designer 6 was used to generate forms for 5.15, so we added support in 5.15.18 . Nevertheless, this is not supported and works by coincidence at best; widget properties and signal/slot names have changed in Qt 6.</p>
]]></description><link>https://forum.qt.io/post/806657</link><guid isPermaLink="true">https://forum.qt.io/post/806657</guid><dc:creator><![CDATA[friedemannkleint]]></dc:creator><pubDate>Tue, 06 Aug 2024 05:46:35 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Mon, 05 Aug 2024 19:53:47 GMT]]></title><description><![CDATA[<p dir="auto">Currently you can not use a Qt designer (or QtCreator) built with Qt6.7 or higher to modify a ui file which should be used with Qt5.</p>
]]></description><link>https://forum.qt.io/post/806635</link><guid isPermaLink="true">https://forum.qt.io/post/806635</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Mon, 05 Aug 2024 19:53:47 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Mon, 05 Aug 2024 17:14:09 GMT]]></title><description><![CDATA[<p dir="auto">See <a href="https://forum.qt.io/topic/157569">https://forum.qt.io/topic/157569</a> and the according bug report here: <a href="https://bugreports.qt.io/browse/QTBUG-126966" target="_blank" rel="noopener noreferrer nofollow ugc">https://bugreports.qt.io/browse/QTBUG-126966</a></p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cristian-adam">@<bdi>cristian-adam</bdi></a>: Qt designer or QtCreator problem? Can't test it - no compilable Qt designer here atm.</p>
]]></description><link>https://forum.qt.io/post/806626</link><guid isPermaLink="true">https://forum.qt.io/post/806626</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Mon, 05 Aug 2024 17:14:09 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Mon, 05 Aug 2024 15:11:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ali-sz">@<bdi>Ali-SZ</bdi></a><br />
As you will understand I am a little lost on all the combinations, you have it in front of you.  I <em>believe</em> you are suggesting you put in vertical spacer but seem to get the output for a horizontal one, or vice versa.</p>
<ul>
<li>Make 100% sure you are placing the right kind of spacer in <strong>Creator</strong>/<strong>Designer</strong>!</li>
<li>If the output in the saved <code>.ui</code> is reversed between Qt5 &amp; 6 you have a <strong>Creator</strong>/<strong>Designer</strong> change/error.</li>
<li>If the <code>.ui</code> files are both correct but the generated <code>ui_....h</code> files have it reversed you have an error in <code>uic</code> between Qt5 &amp; 6.</li>
</ul>
<p dir="auto">If you don't get an answer here you may have to raise a Qt bug report, preferably clearly showing which area the bad situation is in.</p>
]]></description><link>https://forum.qt.io/post/806608</link><guid isPermaLink="true">https://forum.qt.io/post/806608</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Mon, 05 Aug 2024 15:11:02 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Mon, 05 Aug 2024 14:36:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a><br />
I did checkout to my previous commit and build the project and that commit doesn't had this issue so i checked the ui_....h file from the build and the changed line was this:</p>
<pre><code>verticalSpacer_4 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
</code></pre>
<p dir="auto">both QSizePolicy values in function's arguments were swapped.</p>
<p dir="auto">Only change i did in the project was changing the .ui file, i removed the spacer and built it,  then ctrl+z the change and built it again for debugging after this issue happened to me after Qt Creator and sdk update.</p>
<p dir="auto">I use official installed Qt kits in /home/<em>user</em>/Qt for both Qt5 and Qt6 versions, 5.15.0 for Qt5 and 6.5.2 for Qt6. the codes and images i sent was from Qt5 kit.</p>
]]></description><link>https://forum.qt.io/post/806605</link><guid isPermaLink="true">https://forum.qt.io/post/806605</guid><dc:creator><![CDATA[Ali-SZ]]></dc:creator><pubDate>Mon, 05 Aug 2024 14:36:30 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Mon, 05 Aug 2024 13:54:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ali-sz">@<bdi>Ali-SZ</bdi></a><br />
You said you changed something but did not say if it made any difference?</p>
<p dir="auto">I am not sure whether this is relevant.  <strong>Creator</strong> has been updated to generate for newer Qt6, <code>Qt::Orientation::Vertical</code> has replaced <code>Qt::Vertical</code>.  But I think either works for Qt5.</p>
<p dir="auto">Now compare generated <code>ui_....h</code> file, that's all that really matters.  If that is about the only difference, and if it compiles OK, that is not your issue.</p>
<p dir="auto">In Ubuntu 20.04 are you using the Qt5 supplied with it?  Or are you using your own compiled Qt5 or Qt6?  I suspect you are still on Qt5?  I don't know whether <strong>Creator</strong>/<code>uic</code> generate for Qt6, Qt5 or both.</p>
<p dir="auto">Other than this I don't know, maybe someone else knows what is going on.</p>
]]></description><link>https://forum.qt.io/post/806603</link><guid isPermaLink="true">https://forum.qt.io/post/806603</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Mon, 05 Aug 2024 13:54:33 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Mon, 05 Aug 2024 13:43:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a><br />
I checked the previous .ui file and it has changed:</p>
<pre><code>&lt;spacer name="verticalSpacer_4"&gt;
 &lt;property name="orientation"&gt;
  &lt;enum&gt;Qt::Vertical&lt;/enum&gt;
 &lt;/property&gt;
 &lt;property name="sizeHint" stdset="0"&gt;
  &lt;size&gt;
   &lt;width&gt;20&lt;/width&gt;
   &lt;height&gt;20&lt;/height&gt;
  &lt;/size&gt;
 &lt;/property&gt;
&lt;/spacer&gt;
</code></pre>
<p dir="auto">I added new vertical spacer for test and designer added spacer with "&lt;enum&gt;Qt::Orientation::Vertical&lt;/enum&gt;"  instead of "&lt;enum&gt;Qt::Vertical&lt;/enum&gt;" as it used to be.</p>
]]></description><link>https://forum.qt.io/post/806602</link><guid isPermaLink="true">https://forum.qt.io/post/806602</guid><dc:creator><![CDATA[Ali-SZ]]></dc:creator><pubDate>Mon, 05 Aug 2024 13:43:19 GMT</pubDate></item><item><title><![CDATA[Reply to Vertical spacer doesn&#x27;t work after latest update on Mon, 05 Aug 2024 13:20:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ali-sz">@<bdi>Ali-SZ</bdi></a><br />
Is the code you show generated in the <code>.ui</code> file the same as it used to be?  What about the same in <code>generated _ui.h</code>?  If so the issue has nothing to do with the <code>.ui</code>, <strong>Creator</strong> or even <code>uic</code>.</p>
]]></description><link>https://forum.qt.io/post/806596</link><guid isPermaLink="true">https://forum.qt.io/post/806596</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Mon, 05 Aug 2024 13:20:55 GMT</pubDate></item></channel></rss>