--- a/eric6/E5Gui/E5ToolButton.py Sat Sep 21 13:37:58 2019 +0200 +++ b/eric6/E5Gui/E5ToolButton.py Sat Sep 21 15:37:43 2019 +0200 @@ -9,8 +9,10 @@ from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QTimer, QSize -from PyQt5.QtWidgets import QToolButton, QStyle, QStyleOptionToolButton, \ - QStyleOption, QApplication, QLabel +from PyQt5.QtWidgets import ( + QToolButton, QStyle, QStyleOptionToolButton, QStyleOption, QApplication, + QLabel +) class E5ToolButton(QToolButton): @@ -197,13 +199,17 @@ if self.popupMode() == QToolButton.DelayedPopup: self.__pressTimer.start() - if evt.buttons() == Qt.LeftButton and \ - self.__menu is not None and \ - self.popupMode() == QToolButton.InstantPopup: + if ( + evt.buttons() == Qt.LeftButton and + self.__menu is not None and + self.popupMode() == QToolButton.InstantPopup + ): self.setDown(True) self.__showMenu() - elif evt.buttons() == Qt.RightButton and \ - self.__menu is not None: + elif ( + evt.buttons() == Qt.RightButton and + self.__menu is not None + ): self.setDown(True) self.__showMenu() else: @@ -218,13 +224,17 @@ """ self.__pressTimer.stop() - if evt.button() == Qt.MiddleButton and \ - self.rect().contains(evt.pos()): + if ( + evt.button() == Qt.MiddleButton and + self.rect().contains(evt.pos()) + ): self.middleClicked.emit() self.setDown(False) - elif evt.button() == Qt.LeftButton and \ - self.rect().contains(evt.pos()) and \ - evt.modifiers() == Qt.ControlModifier: + elif ( + evt.button() == Qt.LeftButton and + self.rect().contains(evt.pos()) and + evt.modifiers() == Qt.ControlModifier + ): self.controlClicked.emit() self.setDown(False) else: