Is it possible to QCoreApplication.sendEvent a hand made QDropEvent ?
Is it possible to manually create a custom QDropEvent, and then send it to a widget ?
Code:
in a dialog.button.clicked slot:
md.setText('ZZz')
md, QtCore.
Qt.
NoButton, QtCore.
Qt.
NoModifier ,QtCore.
QEvent.
Drop )
print QtGui.
QApplication.
instance().
sendEvent( self , e
) # prints False
The above is not working. It does work for myEvent subclass of QEvent, but not for a QDropEvent. I am curious why.
Re: Is it possible to QCoreApplication.sendEvent a hand made QDropEvent ?
Did you send drag enter event and drag move event prior to sending the drop event?