PyQt5 button to run function and update LCD

前端 未结 2 1321
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-06 15:08

I am getting started with creating GUI\'s in PyQt5 with Python 3. At the click of the button I want to run the \"randomint\" function and display the returned integer to th

2条回答
  •  鱼传尺愫
    2020-12-06 15:30

    Another way of resolving the TypeError: argument 1 has unexpected type 'NoneType is to prefix your slot with lambda: like so:

    self.tableWidget.cellChanged['int','int'].connect(lambda:self.somefunction())
    

    I actually don't know why but it's a solution that worked for me.

提交回复
热议问题