c++ - QGraphicsItem setPos() not triggered -



c++ - QGraphicsItem setPos() not triggered -

and again, trying implement bezier curves redactor. there

class beziernode : public qgraphicsitem beziernode::beziernode(qpointf point, type type) : qgraphicsitem() { setpos(point); setflags(itemismovable | itemsendsscenepositionchanges | itemsendsgeometrychanges); }

it moves around in scene on mousepress + mousemove, , can grab events in itemchange() additional acting command points. in qgraphicsitem::mousemoveevent() (according qt source on gitorious) there phone call item->setpos(...). however, if seek reimplement beziernode::setpos(..), it's never triggered on moving object.

void beziernode::setpos(const qpointf &pos) { qdebug() << "setpos " << pos; m_point = pos; qgraphicsitem::setpos(pos); }

in case setpos() triggers in constructor (there phone call manually). yes, moves in scene properly, can position pos() , utilize everywhere instead of m_point, want understand, happens there.

thanks in advance.

qgraphicsitem::setpos() not virtual, can't override it. that's why beziernode::setpos() never called.

c++ qt qgraphicsitem

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -