eric7/UI/NotificationWidget.py

branch
eric7
changeset 8319
ea11a3948f40
parent 8318
962bce857696
child 8881
54e42bc2437a
equal deleted inserted replaced
8318:962bce857696 8319:ea11a3948f40
260 self.__removeNotification(clickedNotification) 260 self.__removeNotification(clickedNotification)
261 return 261 return
262 262
263 if evt.button() == Qt.MouseButton.LeftButton: 263 if evt.button() == Qt.MouseButton.LeftButton:
264 self.__dragPosition = ( 264 self.__dragPosition = (
265 evt.globalPos() - self.frameGeometry().topLeft() 265 evt.globalPosition().toPoint() - self.frameGeometry().topLeft()
266 ) 266 )
267 self.setCursor(Qt.CursorShape.ClosedHandCursor) 267 self.setCursor(Qt.CursorShape.ClosedHandCursor)
268 evt.accept() 268 evt.accept()
269 269
270 def mouseReleaseEvent(self, evt): 270 def mouseReleaseEvent(self, evt):
284 Protected method to handle dragging the window. 284 Protected method to handle dragging the window.
285 285
286 @param evt reference to the mouse event (QMouseEvent) 286 @param evt reference to the mouse event (QMouseEvent)
287 """ 287 """
288 if evt.buttons() & Qt.MouseButton.LeftButton: 288 if evt.buttons() & Qt.MouseButton.LeftButton:
289 self.move(evt.globalPos() - self.__dragPosition) 289 self.move(evt.globalPosition().toPoint() - self.__dragPosition)
290 evt.accept() 290 evt.accept()

eric ide

mercurial