I am using Pyqt4 to make GUI in python. I want to send a signal from the main GUI to a thread in order to make a function. I know how to send a signal from thread to the main GUI but I don't know the reverse thing. Also I want to pass an variable with signal.
something like:
class MainGUI()
def function
value = 5
self.emit(QtCore.Signal("Signal(int)"),value)
class thread(QtCore.QThread)
def _init_(self)
Qtcore.QThread._init_()
self.connect(Qt.SIGNAL("Signal(int)"),self.run())
def run(self,value):
time.sleep(value)
So every time that the signal is transmitted from the main GUI I want to run the function in the thread in parallel without freezing the GUI.
Any help would be appreciated, Jet