hi,
i've got a QWidget with some lineedits, a "cancel" button and an "apply" button.
i connect the "clicked()" signal to the QWidget like this:
self.connect(self.__apply_button, QtCore.SIGNAL("clicked()"), QtCore.SIGNAL("apply_clicked"))
self.connect(self.__cancel_button, QtCore.SIGNAL("clicked()"), QtCore.SIGNAL("cancel_clicked"))
self.connect(self.__apply_button, QtCore.SIGNAL("clicked()"), QtCore.SIGNAL("apply_clicked"))
self.connect(self.__cancel_button, QtCore.SIGNAL("clicked()"), QtCore.SIGNAL("cancel_clicked"))
To copy to clipboard, switch view to plain text mode
when ths signal is sent, i want to forward a signal to the parent of the QWidget (__mywidget) which is of the type QObject.
at the parent i listen to the signals of my QWidget
self.connect(self.__mywidget, QtCore.SIGNAL("apply_clicked"), self.__handle_apply)
self.connect(self.__mywidget, QtCore.SIGNAL("cancel_clicked"), self.__handle_cancel)
self.connect(self.__mywidget, QtCore.SIGNAL("apply_clicked"), self.__handle_apply)
self.connect(self.__mywidget, QtCore.SIGNAL("cancel_clicked"), self.__handle_cancel)
To copy to clipboard, switch view to plain text mode
the problem is, i never receive the signal from __mywidget. __handle_apply and __handle_cancel are custom slots of course
i also tried to emit a signal manually from __mywidget but it doesn't work either.
NOTE: please consider this is python syntax. should be syntactically ok.
any ideas? what do i have to consider when connecting to signals?
i'm completely clueless, what im doing wrong there.
thanks, chris
Bookmarks