--- a/src/eric7/EricWidgets/EricIconBar.py Thu Aug 25 19:35:37 2022 +0200 +++ b/src/eric7/EricWidgets/EricIconBar.py Fri Aug 26 14:49:15 2022 +0200 @@ -28,6 +28,8 @@ index @signal currentClicked(index) emitted to indicate, that the current icon was clicked + @signal emptyClicked() emitted to indicate a mouse click on the empty part + of the icon bar """ BarSizes = { @@ -53,6 +55,7 @@ currentChanged = pyqtSignal(int) currentClicked = pyqtSignal(int) + emptyClicked = pyqtSignal() def __init__( self, orientation=Qt.Orientation.Horizontal, barSize=DefaultBarSize, parent=None @@ -505,3 +508,12 @@ iconLabel = self.__layout.itemAt(index) if iconLabel: iconLabel.widget().show() + + def mouseReleaseEvent(self, evt): + """ + Protected method to handle a click on the empty space. + + @param evt reference to the mouse event + @type QMouseEvent + """ + self.emptyClicked.emit()