If I find myself subclassing a widget just to get something to happen on an
event am I doing something wrong?
Is there another way to accomplish this?
Is there a way to use an event like a signal in a self.connect?

For example... If I want so do something when a label is clicked I have done
the following and then just connect to the signal I emmit.

class ClickableLabel(QLabel):
    def __init__(self, *args, **kwargs):
        super(ClickableLabel, self).__init__(*args, **kwargs)

    def mousePressEvent(self, event):
        self.emit(SIGNAL("clicked"))


Thanks,
~Eric
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to