Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyuic6 can't convert horizontal lines #126

Open
tordne opened this issue Jul 17, 2024 · 1 comment
Open

pyuic6 can't convert horizontal lines #126

tordne opened this issue Jul 17, 2024 · 1 comment

Comments

@tordne
Copy link

tordne commented Jul 17, 2024

So I'm using PyQt6 designer and need to use the pyuic6 to covert the .ui to *_ui.py files.

But when I include horizontal lines I get the following errors.

Generating Qt_Windows/MainWindow_ui.py from MainWindow.ui
PyQt6.uic.uiparser: toplevel widget is QMainWindow
......
PyQt6.uic.properties: setting property orientation
Traceback (most recent call last):
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/pyuic.py", line 77, in main
generate(args.ui, args.output, args.indent, args.execute,
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/pyuic.py", line 155, in generate
compileUi(ui_file, pyfile, execute, indent)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/compile_ui.py", line 169, in compileUi
winfo = compiler.UICompiler().compileUi(uifile, pyfile)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/Compiler/compiler.py", line 101, in compileUi
w = self.parse(input_stream)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 1014, in parse
self._handle_widget(ui_file.widget)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 842, in _handle_widget
self.traverseWidgetTree(el)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 818, in traverseWidgetTree
handler(self, child)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 280, in createWidget
self.traverseWidgetTree(elem)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 818, in traverseWidgetTree
handler(self, child)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 280, in createWidget
self.traverseWidgetTree(elem)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 818, in traverseWidgetTree
handler(self, child)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 280, in createWidget
self.traverseWidgetTree(elem)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 818, in traverseWidgetTree
handler(self, child)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 280, in createWidget
self.traverseWidgetTree(elem)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 818, in traverseWidgetTree
handler(self, child)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 512, in createLayout
self.traverseWidgetTree(elem)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 818, in traverseWidgetTree
handler(self, child)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 555, in handleItem
self.traverseWidgetTree(elem)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 818, in traverseWidgetTree
handler(self, child)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 271, in createWidget
self.stack.push(self._setupObject(widget_class, parent, elem))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/uiparser.py", line 237, in _setupObject
self.wprops.setProperties(obj, branch)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/properties.py", line 428, in setProperties
getattr(self, prop_name)(widget, prop)
File "/path/to/.venv/lib64/python3.12/site-packages/PyQt6/uic/properties.py", line 513, in orientation
{'Qt::Horizontal': QtWidgets.QFrame.Shape.HLine,
KeyError: 'Qt::Orientation::Horizontal'
make: *** [Makefile:10: Qt_Windows/MainWindow_ui.py] Error 1

I'm not sure what you need to find the error, but if you need anything else, please let me know

@altendky
Copy link
Owner

pyqt-tools is a repackaging of existing Qt and PyQt tooling in a compiled form that is readily installed within the Python ecosystem. It's almost more or less unmaintained at this point. This error appears to be an issue in PyQt6 itself so you will probably need to go there for help with it. https://riverbankcomputing.com/support/pyqt You will likely also need to be working with a newer version than is included in the existing repackaging releases of pyqt-tools.

Sorry I'm not more directly helpful on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants