pyside connection Error “RuntimeError: Failed to connect signal clicked()”

前端 未结 2 1485
不知归路
不知归路 2020-12-10 20:28
from PySide.QtCore import *
from PySide.QtGui import *

import sys
import stackwid

class Dialog(QDialog,stackwid.Ui_Dialog):

    def __init__(self,parent = None):
         


        
2条回答
  •  北海茫月
    2020-12-10 20:49

    You don't connect the signal to your set()-function, but to it's return value. You just need to remove the parenthesis, then it should work:

    self.camButton.clicked.connect(self.set)
    

提交回复
热议问题