<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>you are facing the same issue that I reported some time ago
already. Phil has changed the sources to cope with the current
situation, which is caused by a change in Qt Designer starting
with Qt 6.7.0. Your possible solutions are as follows.</p>
<p>1. Use the PyQt6 6.7.1 provided by Phil through his lokal PyPI
server.</p>
<p>2. Use Qt Designer of Qt 6.6.x.</p>
<p>I opted for the second solution for the moment.</p>
<p>Regards,<br>
Detlev<br>
</p>
<div class="moz-cite-prefix">Am 24.06.24 um 15:09 schrieb Panagiotis
Iosif:<br>
</div>
<blockquote type="cite"
cite="mid:CALbSxMsJMJCfU45x_7pSxXTq0yjtMxE0GadGRG-yVMdij==-6w@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>Hello,<br>
<br>
</div>
I am facing an issue when trying to run
<b>pyuic6 </b>to convert my ".ui" file
to a ".py" file.<br>
<br>
</div>
The command I am running is this one:<br>
pyuic6 tabs.ui -o tabs.py<br>
<br>
</div>
An the error I get says the following:<br>
----------<br>
An unexpected error occurred.<br>
Check that you are using the latest version
of pyuic6 and send an error report<br>
to the PyQt mailing list and include the
following information:<br>
- your version of pyuic6 (6.7.0)<br>
- the .ui file that caused this error<br>
- the debug output of pyuic6 (use the
--debug flag when calling pyuic6)<br>
----------<br>
<br>
</div>
As per the error's instructions, I am
attaching the "tabs.ui" file and the output of
the command:<br>
pyuic6 tabs.ui -o tabs.py --debug 2>&1
| tee -a pyuic6_output.log<br>
<br>
</div>
I suspect that when I save the files "tabs.ui"
from Qt Designer, the property "Orientation"
gets saved as "Qt::Orientation::Horizontal".<br>
<br>
</div>
However, the file "properties.py" that resides in
my miniconda installation at:<br>
<p
style="margin:0px;text-indent:0px;white-space:pre-wrap">/home/paniosif/miniconda3/envs/ahead3/lib/python3.9/site-packages/PyQt6/uic/properties.py</p>
<br>
probably handles "Orientation" differently.<br>
<br>
</div>
For example, checking the contents of that file and
searching for the keyword "Orientation" this is what
I see:<br>
----------<br>
def orientation(self, widget, prop):<br>
# If the class is a QFrame, it's a line.<br>
if widget.metaObject().className() ==
'QFrame':<br>
widget.setFrameShape(<br>
{'Qt::Horizontal':
QtWidgets.QFrame.Shape.HLine,<br>
'Qt::Vertical' :
QtWidgets.QFrame.Shape.VLine}[prop[0].text])<br>
else:<br>
widget.setOrientation(self._enum(prop[0]))<br>
----------<br>
<br>
</div>
Does anyone have an idea as to how I can solve this
issue?<br>
<br>
</div>
(I guess I can always manually edit either
"properties.py" stored in the "uic" folder or my
"tabs.ui" file as needed to make sure they agree on the
definition of "Qt::Orientation::Horizontal".<br>
<br>
</div>
I do not know though if this works as it should.<br>
<br>
</div>
I would expect that saving a ".ui" file through Qt Designer
(version 6.7.0) would respect whatever definitions of
properties are needed from "uic".<br>
<br>
</div>
Am I missing something?<br>
<br>
</div>
<div>Thanks for any help!</div>
<div><br>
</div>
<div>Best,<br>
</div>
<div>Panagiotis<br>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div><br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Detlev Offenbach
<a class="moz-txt-link-abbreviated" href="mailto:detlev@die-offenbachs.de">detlev@die-offenbachs.de</a></pre>
</body>
</html>