Beispiel #1
0
    def eventFilter(self, obj, event):
        if obj is self.widget() and event.type() == QEvent.Resize:
            if event.size() == event.oldSize() and self.widgetResizable():
                # This is driving me insane. This should not have happened.
                # Before the event is sent QWidget specifically makes sure the
                # sizes are different, but somehow I still get this, and enter
                # an infinite recursion if I enter QScrollArea.eventFilter.
                # I can only duplicate this on one development machine a
                # Mac OSX using fink and Qt 4.7.3
                return False

        return QScrollArea.eventFilter(self, obj, event)
Beispiel #2
0
    def eventFilter(self, obj, event):
        if obj is self.widget() and event.type() == QEvent.Resize:
            if event.size() == event.oldSize() and self.widgetResizable():
                # This is driving me insane. This should not have happened.
                # Before the event is sent QWidget specifically makes sure the
                # sizes are different, but somehow I still get this, and enter
                # an infinite recursion if I enter QScrollArea.eventFilter.
                # I can only duplicate this on one development machine a
                # Mac OSX using fink and Qt 4.7.3
                return False

        return QScrollArea.eventFilter(self, obj, event)