Winand

pyqtSlot problem

Apr 20th, 2015
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. class Form1(QtGui.QDialog):
  2.     def __init__(self):
  3.         self.btnRecentSetouts.clicked.connect(self.RecentSetouts)
  4.         self.btnCassette.clicked.connect(self.Cassette)
  5.  
  6.     @pyqtThreadedSlot()
  7.     def RecentSetouts(self, checked):
  8.         print("recent")
  9.  
  10.     @pyqtThreadedSlot()
  11.     def Cassette(self, checked):
  12.         print("Cassette")
  13.  
  14. def pyqtThreadedSlot(*args, **kwargs):
  15.     def threaded_int(func):
  16.         # @QtCore.pyqtSlot(*args, **kwargs)
  17.         def wrap_func(self, *args1,**kwargs1):
  18.             GenericThread(self, func, *args1, **kwargs1)
  19.         return wrap_func
  20.     return threaded_int
Advertisement
Add Comment
Please, Sign In to add comment