Hello , i'm using pyqt 4 and i have a issue with signals
i'm trying to send a signal into an QmdiSubWindow , from my QMainWindow whenever a button is checked to tell the QMdiSubWindow that it has been checked ,
so the way i proceed is like this :
in my QMainWindow : i connect the signal to a fonction :
self.connect (self.moveButton , SIGNAL("clicked()") , self.send_move_signal)
self.connect (self.moveButton , SIGNAL("clicked()") , self.send_move_signal)
To copy to clipboard, switch view to plain text mode
My send_move_Signal method :
def send_move_signal(self):
self.moveButton.setChecked(True)
self.mdiArea.activeSubWindow().emit ( SIGNAL("moveButton_activated"))
def send_move_signal(self):
self.moveButton.setChecked(True)
self.mdiArea.activeSubWindow().emit ( SIGNAL("moveButton_activated"))
To copy to clipboard, switch view to plain text mode
and in the constructor of my Mdi-Widget i proceed like that :
class MdiWid
( QWidget , Ui_SubMdiWindow
): def __init__(self,parent=None):
super(MdiWid,self).__init__(parent)
self.connect (self , SIGNAL("moveButton_activated"),self.updateMoveState)
def updateMoveState(self):
self.moveButton_activated = True
class MdiWid ( QWidget , Ui_SubMdiWindow):
def __init__(self,parent=None):
super(MdiWid,self).__init__(parent)
self.connect (self , SIGNAL("moveButton_activated"),self.updateMoveState)
def updateMoveState(self):
self.moveButton_activated = True
To copy to clipboard, switch view to plain text mode
But it doesn't work , and i don't see why
Any help please ,
Bookmarks