<?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[New Update of Qt Creator causes problem with PyQt6.uic]]></title><description><![CDATA[<p dir="auto">Hello I'm currently using PyQt6 for my project. I create and design  the ui with Qt Creator and today I updated the QT Creator program but now I having errors. I didn't get any ui errors before update. It works when I'm not doing any alligments but it still a huge problem.</p>
<p dir="auto">how I load ui:</p>
<pre><code>#imports
from PyQt6.QtWidgets import (QApplication, QMainWindow, QTextEdit, QComboBox, 
                             QPushButton, QVBoxLayout, QWidget, QHBoxLayout, QLabel, 
                             QLineEdit, QMessageBox ,QFileDialog)
from PyQt6.QtCore import QThread, pyqtSignal, QTimer
from PyQt6 import uic

class MainWindow(QMainWindow):
    def __init__(self):
        super().__init__()     
        uic.loadUi("ui/main_window.ui",self)

</code></pre>
<p dir="auto">The error that I'm getting:</p>
<pre><code>Traceback (most recent call last):
  File "c:\Users\baris\Desktop\LAZER\main.py", line 203, in &lt;module&gt;
    main_window = MainWindow()
                  ^^^^^^^^^^^^
  File "c:\Users\baris\Desktop\LAZER\main.py", line 91, in __init__
    uic.loadUi("ui/main_window.ui",self)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\load_ui.py", line 86, in loadUi
    return DynamicUILoader(package).loadUi(uifile, baseinstance)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\PyQt6\uic\Loader\loader.py", line 62, in loadUi
    return self.parse(filename)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 1014, in parse
    self._handle_widget(ui_file.widget)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 842, in _handle_widget
    self.traverseWidgetTree(el)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 818, in traverseWidgetTree
    handler(self, child)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 280, in createWidget
    self.traverseWidgetTree(elem)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 818, in traverseWidgetTree
    handler(self, child)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 512, in createLayout
    self.traverseWidgetTree(elem)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 818, in traverseWidgetTree
    handler(self, child)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 555, in handleItem
    self.traverseWidgetTree(elem)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 818, in traverseWidgetTree
    handler(self, child)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 512, in createLayout
    self.traverseWidgetTree(elem)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 818, in traverseWidgetTree
    handler(self, child)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 555, in handleItem
    self.traverseWidgetTree(elem)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 818, in traverseWidgetTree
    handler(self, child)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 512, in createLayout
    self.traverseWidgetTree(elem)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 818, in traverseWidgetTree
    handler(self, child)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 555, in handleItem
    self.traverseWidgetTree(elem)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 818, in traverseWidgetTree
    handler(self, child)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 512, in createLayout
    self.traverseWidgetTree(elem)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 818, in traverseWidgetTree
    handler(self, child)
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 554, in handleItem
    elem[0].attrib['layout-position'] = _layout_position(elem)
                                        ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 88, in _layout_position
    return (0, _parse_alignment(alignment))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\PyQt6\uic\uiparser.py", line 61, in _parse_alignment
    _, qt_align = qt_align.split('::')
    ^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)
</code></pre>
<p dir="auto">As I said I  didn't get any problems before QT Creator update.</p>
]]></description><link>https://forum.qt.io/topic/158135/new-update-of-qt-creator-causes-problem-with-pyqt6-uic</link><generator>RSS for Node</generator><lastBuildDate>Thu, 21 May 2026 20:21:58 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/158135.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 09 Aug 2024 07:06:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to New Update of Qt Creator causes problem with PyQt6.uic on Sun, 17 May 2026 10:43:15 GMT]]></title><description><![CDATA[<p dir="auto">sudo apt install pyqt6-dev-tools solved it for me on Ubuntu.</p>
]]></description><link>https://forum.qt.io/post/838270</link><guid isPermaLink="true">https://forum.qt.io/post/838270</guid><dc:creator><![CDATA[B_Quite]]></dc:creator><pubDate>Sun, 17 May 2026 10:43:15 GMT</pubDate></item><item><title><![CDATA[Reply to New Update of Qt Creator causes problem with PyQt6.uic on Fri, 09 Aug 2024 12:46:20 GMT]]></title><description><![CDATA[<p dir="auto">This is a apparently a consequence of introducing support for fully qualified enums for PySide 6 (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> ). Please ask the PyQt6 developers to adapt to this. pyside6-uic will correctly handle this.</p>
]]></description><link>https://forum.qt.io/post/806976</link><guid isPermaLink="true">https://forum.qt.io/post/806976</guid><dc:creator><![CDATA[friedemannkleint]]></dc:creator><pubDate>Fri, 09 Aug 2024 12:46:20 GMT</pubDate></item><item><title><![CDATA[Reply to New Update of Qt Creator causes problem with PyQt6.uic on Fri, 09 Aug 2024 08:56:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/barisubasi">@<bdi>barisubasi</bdi></a><br />
BTW, as a heads-up.  You are developing by loading the <code>.ui</code> file dynamically at runtime, as per e.g. <a href="https://www.pythonguis.com/tutorials/pyqt6-first-steps-qt-designer/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.pythonguis.com/tutorials/pyqt6-first-steps-qt-designer/</a> <strong>Loading the .ui file directly</strong> subsection.  Unless you have a pathological reason for this approach, do yourself a favour and change over to producing a <code>.py</code> file from the <code>.ui</code> as per <strong>Converting your .ui file to Python</strong> topic there.  Similar in <a href="https://stackoverflow.com/questions/66613380/downloading-qtdesigner-for-pyqt6-and-converting-ui-file-to-py-file-with-pyuic6" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/66613380/downloading-qtdesigner-for-pyqt6-and-converting-ui-file-to-py-file-with-pyuic6</a>.  I don't know but I <em>imagine</em> you can set <strong>Creator</strong> to run this for you automatically whenever the <code>.ui</code> file is updated.</p>
<p dir="auto">This requires an extra step during development, but in return you get a better development-time experience and a much better interface to the widgets you design: at present I believe you have to call <code>QObject.findChild(...)</code> to access any widgets you created, with the Python class generation approach you get variables for each of your widgets.</p>
<p dir="auto">As a side effect this would eliminate the calls to <code>PyQt6\uic\uiparser.py</code> where your current error is occurring.  Mind you, if I am right about the <code>.ui</code> file format having changed you are likely to need a newest version of <code>pyuic6</code> executable from PyQt, so your issue may need a newer version of PyQt6 (or a downgrade of <strong>Creator</strong>) in either case.</p>
<p dir="auto">Finally, depending on how big/how committed your project is to PyQt, you might consider moving over to PySide6.  When I first started in Qt5 only PyQt5 was "advanced" enough to use for Python, PySide/PySide2 was too "backward".  Now PySide6 seems to be just about as good as PyQt6.</p>
]]></description><link>https://forum.qt.io/post/806955</link><guid isPermaLink="true">https://forum.qt.io/post/806955</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Fri, 09 Aug 2024 08:56:38 GMT</pubDate></item><item><title><![CDATA[Reply to New Update of Qt Creator causes problem with PyQt6.uic on Fri, 09 Aug 2024 08:22:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/barisubasi">@<bdi>barisubasi</bdi></a><br />
I realize you perceive this as a <strong>Creator</strong> issue, but it is not clear to me how this can be.  <strong>Creator</strong> is a UI for developing code.  The error traceback you show is down in PyQt6, in the <code>uic</code> module which is attempting to parse your <code>.ui</code> file.  The error is really there....</p>
<p dir="auto">I seem to recall in another thread here than someone may have said that the latest <strong>Creator</strong> (13/14/15?) now saves the <code>.ui</code> file in a newer format than it used to?  If so it may be that the PyQt <code>uic</code> module you have does not handle that or needs updating to a latest version?  If you have the <code>.ui</code> file from before you upgraded <strong>Creator</strong> compare that against how it is being produced now, is there a difference?  I have a <em>feeling</em> this is the issue....?</p>
<p dir="auto">Otherwise you would probably have to contact the PyQt folks since that is where the error lies.</p>
<p dir="auto">BTW, you should be able to run your Python program quite outside of <strong>Creator</strong>, and I would expect it to show the same error.</p>
]]></description><link>https://forum.qt.io/post/806948</link><guid isPermaLink="true">https://forum.qt.io/post/806948</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Fri, 09 Aug 2024 08:22:53 GMT</pubDate></item></channel></rss>