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

doesn't work in latest unreal #10

Closed
hannesdelbeke opened this issue Apr 28, 2024 · 9 comments · Fixed by #12
Closed

doesn't work in latest unreal #10

hannesdelbeke opened this issue Apr 28, 2024 · 9 comments · Fixed by #12
Labels
bug Something isn't working

Comments

@hannesdelbeke
Copy link
Collaborator

hannesdelbeke commented Apr 28, 2024

latest unreal uses pyside6, Qt.py doesnt support this yet.
another wrapper qtpy, would work.
but pyside6 released a bug in their latest release, which also breaks with qtpy. no good solution available atm.

more details here plugget/plugget-unreal-plugin#14

there are 2 problems:

  • no PySide6 support
    • wait untill Qt.py has PySide 6 support. might be a long time.
    • or swap to qtpy instead of Qt.py
  • PySide 6 bug
    • wait for the next PySide6 release. could be months or year (clean but slow)
    • try a workaround by manually importing from PySide6 in specific way. messy and annoying approach, time consumiong dev time
@munkybutt
Copy link

I have tried to get this to work with unreal 5.4, using PySide6 6.7.2 and qtpy.
Unreal hangs when trying to run _loadUi. Debugging leads to QUiLoader.__init__(self, baseinstance) in UiLoader.

I will try roll back to earlier versions of PySide6 and see if that works around the issue

@hannesdelbeke
Copy link
Collaborator Author

hannesdelbeke commented Jul 4, 2024 via email

@munkybutt
Copy link

munkybutt commented Jul 4, 2024

We aren't using Qt.py in our code base anymore, they kind of missed the boat with Qt6 support so we moved on, changing back to Qt.py will be a big undertaking.

The crash happens when PySide6 calls QUiLoader.__init__ which is calling the underlying c++ so not something that could be fixed on the python side I don't think :/

I will see if unreal 5.3 works if I get a chance.

For now rolling back to earlier versions of PySide6 to see any work.

Also grumbling a lot about why people use ui files for production tools instead of just writing code 😭

@munkybutt
Copy link

6.6 still hangs
6.5 crashes unreal on startup
6.4 same

Installed Qt.py alongside qtpy and hang still occurs with 6.7 + 6.6.
There must be some issue with Unreal 5.4 + Python 3.11 + PySide6 QUiLoader 😖

@hannesdelbeke hannesdelbeke added the bug Something isn't working label Oct 6, 2024
@hannesdelbeke
Copy link
Collaborator Author

i think there is a similar loadUI issue with Blender and PySide6 techartorg/bqt#124

@hannesdelbeke
Copy link
Collaborator Author

possible related issue from 2017 with PySide and Qt.py mottosso/Qt.py#208

@hannesdelbeke
Copy link
Collaborator Author

tried using qtpy instead of Qt.py, still freezes Unreal

@munkybutt
Copy link

munkybutt commented Oct 6, 2024

Yeah that makes sense - the error happens on the c++ side. Might be worth raising a bug with Qt/Pyside? The only other way I thought to be able to debug it was compile PySide6 myself to be able to follow the call stack into c++. Not had time to fight that battle though

@hannesdelbeke
Copy link
Collaborator Author

i managed to launch it without crashing, when I created py files from the ui file with the command

pyside6-uic "D:\Unreal Projects\blueprint\Content\Python\Lib\site-packages\unreal_script_editor\ui\output_text_widget.ui" -o "D:\Unreal Projects\blueprint\Content\Python\Lib\site-packages\unreal_script_editor\ui\output_text_widget.py"
pyside6-uic "D:\Unreal Projects\blueprint\Content\Python\Lib\site-packages\unreal_script_editor\ui\script_editor.ui" -o "D:\Unreal Projects\blueprint\Content\Python\Lib\site-packages\unreal_script_editor\ui\script_editor.py"

however it seems i need to edit / update some code too, which is still WIP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants