c++ - QGraphicsView and QMouseMove Event -


i have borderless (no title bar) qwidget window qgraphicsview inside. i've overwritten mousepressevent , mousemoveevent move window on desktop, when press on qgraphicsview not works.

below, code of mousepressevent , mousemoveevent:

void widget::mousepressevent(qmouseevent *evt) {     oldpos = evt->globalpos(); }  void widget::mousemoveevent(qmouseevent *evt) {     const qpoint delta = evt->globalpos() - oldpos;     move(x() + delta.x(), y() + delta.y());     oldpos = evt->globalpos(); } 

i overwritten same code:

void mousepressevent(qgraphicsscenemouseevent *evt); void mousemoveevent(qgraphicsscenemouseevent *evt);

i tried with:

setinteractive(false); setdragmode(scrollhanddrag); 

but nothing!

is there way solve this?


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

How do you convert a timestamp into a datetime in python with the correct timezone? -