karensantana
karensantana

Reputation: 75

Drag.start in pyqt

I'm developing an app that needs to simulate a drag and drop action using the voice, but when im trying to emit a signal to get the mouse release, the code blocks until the drag and drop action finishes. I need to send a signal to permit dropaction happen . How can i send a signal or execute a command during the drag.start action. Thanks in advance!

Upvotes: 2

Views: 286

Answers (1)

user1006989
user1006989

Reputation:

You could for example reimplement the start method to emit a signal, something like:

class MyDrag(QtGui.QDrag):
    dragStarted = QtCore.pyqtSignal()

    def __init__(self, dragSource):
        super(MyDrag, self).__init__(dragSource)

    def start(self):
        self.dragStarted.emit()

        super(MyDrag, self).start()

Upvotes: 1

Related Questions