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
Post a Comment