Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
None
-
5.15.2
-
None
Description
When I used the Python script generated by pyside2-uic, I got the following error:
Traceback (most recent call last):
File "/home/minh/gui-project/qtgraph_side.py", line 230, in <module>
main()
File "/home/minh/gui-project/qtgraph_side.py", line 222, in main
window = MainWindow()
File "/home/minh/gui-project/qtgraph_side.py", line 219, in _init_
self.ui.setupUi(self)
File "/home/minh/gui-project/sideui.py", line 21, in setupUi
self.actionOpen = QAction(MainWindow)
TypeError: 'PySide2.QtWidgets.QAction' called with wrong argument types:
PySide2.QtWidgets.QAction(MainWindow)
Supported signatures:
PySide2.QtWidgets.QAction(PySide2.QtGui.QIcon, str, typing.Union[PySide2.QtCore.QObject, NoneType] = None)
PySide2.QtWidgets.QAction(typing.Union[PySide2.QtCore.QObject, NoneType] = None)
PySide2.QtWidgets.QAction(str, typing.Union[PySide2.QtCore.QObject, NoneType] = None)
It seems that pyside2-uic generated the wrong signature for QAction. When I tried QUiLoader instead everything worked just fine. However I'd like to generate a script if possible.