plugget / plugget-unreal-plugin

unreal plugin to search & install plugget packages
2 stars 0 forks source link

BREAKING BUG - PySide6 issue #14

Closed hannesdelbeke closed 5 months ago

hannesdelbeke commented 5 months ago

when running plugget_qt.show()

LogPython: Error: TypeError: 'PySide6.QtWidgets.QWidget.setLayout' called with wrong argument types:
LogPython: Error:   PySide6.QtWidgets.QWidget.setLayout(QVBoxLayout)
LogPython: Error: Supported signatures:
LogPython: Error:   PySide6.QtWidgets.QWidget.setLayout(PySide6.QtWidgets.QLayout)
# after changing the layout code from 
layout=QHLayout()
layout.setlayout(parent)
# to 
layout=QHLayout(parent)

it works now, but a new error.

LogPython: Error:     layout.addWidget(self.package_list)
LogPython: Error: TypeError: 'PySide6.QtWidgets.QBoxLayout.addWidget' called with wrong argument types:
LogPython: Error:   PySide6.QtWidgets.QBoxLayout.addWidget(QTableWidget)
LogPython: Error: Supported signatures:
LogPython: Error:   PySide6.QtWidgets.QBoxLayout.addWidget(PySide6.QtWidgets.QWidget, int = 0, PySide6.QtCore.Qt.AlignmentFlag = Default(Qt.Alignment))
hannesdelbeke commented 5 months ago

works in pyside2

hannesdelbeke commented 5 months ago

this code works outside unreal, but crashes in unreal. works in unreal if we swap to pyside2. something with pyside6 is incompatible in unreal

from PySide6 import QtWidgets

app = QtWidgets.QApplication()
window = QtWidgets.QWidget()
layout = QtWidgets.QVBoxLayout()
window.setLayout(layout)
window.show()
app.exec_()

this code throws an error

LogPython: Error: Traceback (most recent call last):
LogPython: Error:   File "<string>", line 1, in <module>
LogPython: Error:   File "D:\Program Files\Epic Games\UE_5.4\Engine\Binaries\ThirdParty\Python3\Win64\Lib\site-packages\plugget_qt\__init__.py", line 20, in test
LogPython: Error:     window.setLayout(layout)
LogPython: Error: TypeError: 'PySide6.QtWidgets.QWidget.setLayout' called with wrong argument types:
LogPython: Error:   PySide6.QtWidgets.QWidget.setLayout(QVBoxLayout)
LogPython: Error: Supported signatures:
LogPython: Error:   PySide6.QtWidgets.QWidget.setLayout(PySide6.QtWidgets.QLayout)
hannesdelbeke commented 5 months ago

restarting unreal fixed this. i m used to not having to do this in maya and max after installing qt.

hannesdelbeke commented 5 months ago

this is back, sometimes it works on startup, sometimes it doesn't. believe it might be related to when i restart, it asks to recompile the project

hannesdelbeke commented 5 months ago

seems a pyside bug https://forum.qt.io/topic/155934/pyside6-7-is-majorly-broken-typeerrors-everywhere

hannesdelbeke commented 5 months ago

commited a workaround to plugget_qt for now