Retrive QPainter pointer
General and Desktop
4
Posts
3
Posters
2.8k
Views
1
Watching
-
Hi All,
I'd like to know if should be possible to retrive with some function the pointer to painter into QGraphicsObject, something like:@
MyGraphicsObject *mgo=new MyGraphicsObject;
QPainter *myPainter=mgo->getPainter();
@Thanks
-
When i create a class inherit from a QGraphicsObject i must implement some function like paint(...). In this function there's an object, QPainter, that permit to draw into the graphics context of my graphicsobject.
For some reason i'd like to create an object that retrive this obj and could be draw directly on the graphicsobject.
I suppose that your suggest could be the way that i'm finding.
Let you know soon with the result.
Thanks.