python: Process finished with exit code 1 when using PyCharm and PyQt5

后端 未结 3 2042
不思量自难忘°
不思量自难忘° 2020-12-10 14:50

I have three Python(3.4.3) scripts. One of them is for controlling the .ui file generated by PyQt5. When I run the GUI program it accepts all the data and everything and whe

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-10 15:28

    You have used self.sender.setText(email)

    This is probably causing the problem in my opinion because, "sender" is the name in QObject's function and it does not have any setText attribute, so there may be the problem.

    You have to specifically call the widget and setText to it. For this, you can use instances of the py file of the layout creator.

    I had the same issue when I was trying to use this self.ui.lineEdit().text() Here, the problem was -> I was calling the lineEdit function, whereas I had to use it's one attribute.

提交回复
热议问题