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 file in same folder and do a new exercise, but when run in the new Python file, the object does not appear. Then I copied the codes from my old exercise and pasted them into the new file, this time it works. But when I open a new file 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 file, 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 folder, the paths look the same, the rules are the same, but I couldn’t find a solution to the problem.