1

I developed a GUI application with python and pyqt5 in Ubuntu 16.04. There is an QActionBar in application that have some clickable items. All of functionalities in Ubuntu works perfect. As I want to export executable file for MS Windows, I was forces to migrate to Windows.

The problem is running same code gives me an error:

TypeError: connect() failed between triggered(bool) and newProject()

And this is part of my codes:

self.actionNewProject = QtWidgets.QAction(GoodProject)
...
self.actionNewProject.triggered.connect(self.newProject)
...
@QtCore.pyqtSlot()
def newProject(self):
    print('foo')
4

1 回答 1

0

删除“pyqtSlot()”行将解决此问题

于 2020-05-24T13:27:42.537 回答