903 @return flag indicating, if we handled the event |
903 @return flag indicating, if we handled the event |
904 @rtype bool |
904 @rtype bool |
905 """ |
905 """ |
906 if ( |
906 if ( |
907 event.type() == QEvent.Type.MouseButtonPress and |
907 event.type() == QEvent.Type.MouseButtonPress and |
908 not event.button() == Qt.MouseButton.RightButton |
908 event.button() != Qt.MouseButton.RightButton |
909 ): |
909 ): |
910 switched = True |
910 switched = True |
911 if isinstance(watched, QStackedWidget): |
911 if isinstance(watched, QStackedWidget): |
912 switched = watched is not self.currentStack |
912 switched = watched is not self.currentStack |
913 self.currentStack = watched |
913 self.currentStack = watched |