qt - Can I resize QGraphicsItem without creating a class that inherits QGraphicsItem? -


i want ask question can resize qgraphicsitem without creating class inherits qgraphicsitem. example, this:

void myscene::mousepressevent(qgraphicsscenemouseevent *event) {    point = event->scenepos();    if( arrowcursor )    {       curitem = this->itemat( point, view->transform() );       if( curitem && !curitem->isselected() )       {          curitem->update( 10,10, 100, 100 );       }     } } 

curitem->settransform(qtransform::fromscale(2.0,2.0), true); 

offtopic: strange doing subclassing qgraphicsscene.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -