Beispiel #1
0
def test_drag_move_events(botlicense):
    qtbot, dialog = botlicense

    mime_data = QMimeData()
    mime_no_data = QMimeData()
    mime_data.setUrls([QUrl.fromLocalFile(EXPIRED_LICENSE_PATH)])

    event = create_event(dialog.table, mime_data, QDragEnterEvent)
    dialog.table.dragEnterEvent(event)

    event = create_event(dialog.table, mime_no_data, QDragEnterEvent)
    dialog.table.dragEnterEvent(event)

    event = create_event(dialog.table, mime_data, QDragMoveEvent)
    dialog.table.dragMoveEvent(event)

    event = create_event(dialog.table, mime_no_data, QDragMoveEvent)
    dialog.table.dragMoveEvent(event)

    event = QDragLeaveEvent()
    dialog.table.dragLeaveEvent(event)
Beispiel #2
0
 def dragLeaveEvent(self, event: QtGui.QDragLeaveEvent):
     self.dragLeaveSignal.emit()
     event.accept()
Beispiel #3
0
 def dragLeaveEvent(self, event: QtGui.QDragLeaveEvent):
     self.resetStyle()
     event.accept()