From 3861d587494356e322d053903a2b39d4dfa31c28 Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Wed, 24 Jan 2024 10:37:54 +0800 Subject: [PATCH] dndwidgets: change splitter to use signal --- artiq/gui/dndwidgets.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/artiq/gui/dndwidgets.py b/artiq/gui/dndwidgets.py index b93f4d330..03e8a5e63 100644 --- a/artiq/gui/dndwidgets.py +++ b/artiq/gui/dndwidgets.py @@ -2,6 +2,8 @@ from PyQt5 import QtCore, QtWidgets class VDragDropSplitter(QtWidgets.QSplitter): + dropped = QtCore.pyqtSignal(int, int) + def __init__(self, parent): QtWidgets.QSplitter.__init__(self, parent=parent) self.setAcceptDrops(True) @@ -50,7 +52,7 @@ class VDragDropSplitter(QtWidgets.QSplitter): for n in range(self.count()): w = self.widget(n) if pos.y() < w.y() + w.size().height(): - self.insertWidget(n, src) + self.dropped.emit(src_i, n) break e.accept()