I’m working on PyQt5 QtWidgets for practice purposes in Python. It was working flawlessly in the exercise I did recently. Now, I wanted to open a new Python document for the same file and do a new exercise, but when run in the new Python document, the object does not appear. Then I copied the codes from my old exercise and pasted them into the new document, this time it works. But when I open a new document and want to create a new project, the PyQt5 element does not appear on the screen again.
And exit code is “Process finished with exit code -1”
Now, I wrote the exact codes in the old document, but the old one works, the new one does not. If I copy the old ones to the new one, it works. And they are all in the same file, the paths look the same, the rules are the same, but I couldn’t find a solution to the problem.