Parent widget doesn't respond to first mouse click after Modal QDialog closed, the QDialog is closed by calling done() in mousemoveevent() and this causes the mouse button is still being pressed after the dialog is closed, the second click onward will work as normal.
My finding so far:
If
done(int)
is called inMouseReleaseeEvent()
, everything works as expectedIt seems like the
QDialog
is lack ofMouseButtonRelease
event (which it's expecting after aMouseButtonPress
event fired) due to theQDialog
is already closed in theMouseMoveEvent
and this messes up the mouse event of the parent widget.
My intention is to make a QDialog
which can be closed by sliding, when It detects mouse pressed and moved to certain position, it will be closed.
It is much appreciated if everyone who encountered it before or who has any idea what's going on to give me some advice.
MANY THANKS.
Also, this is the first time I post a question here, if I missed any information that I suppose to provide, please let me know...