eric6/UI/NotificationWidget.py

changeset 8154
5f4b02eefc32
parent 8143
2c730d5fd177
child 8218
7c09585bd960
equal deleted inserted replaced
8152:0c740fcffd34 8154:5f4b02eefc32
255 255
256 @param evt reference to the mouse event (QMouseEvent) 256 @param evt reference to the mouse event (QMouseEvent)
257 """ 257 """
258 if not self.__settingPosition: 258 if not self.__settingPosition:
259 clickedLabel = self.childAt(evt.pos()) 259 clickedLabel = self.childAt(evt.pos())
260 clickedNotification = clickedLabel.parent() 260 if clickedLabel:
261 self.__removeNotification(clickedNotification) 261 clickedNotification = clickedLabel.parent()
262 self.__removeNotification(clickedNotification)
262 return 263 return
263 264
264 if evt.button() == Qt.MouseButton.LeftButton: 265 if evt.button() == Qt.MouseButton.LeftButton:
265 self.__dragPosition = ( 266 self.__dragPosition = (
266 evt.globalPos() - self.frameGeometry().topLeft() 267 evt.globalPos() - self.frameGeometry().topLeft()

eric ide

mercurial