How can i get a QPixmap from a QGraphicsPolygonItem
how can i get a QPixmap from a QGraphicsPolygonItem?
i want to add a QGraphicsPolygonItem to QDrag::setPixmap(), is there any way to do this?
You can use "QGraphicsScene::render":http://qt-project.org/doc/qt-5/qgraphicsscene.html#render to render the part where you polygon item can be found on a QPixmap.
Hope it helps
but i mean that i have a custom class inherited from QGraphicsPolygonItem.
and i want to set it as the param of QDrag::setPixmap().
so i want to transform the QGraphicsPolygonItem to QPixmap.
That I understood, however AFAIK, there's no direct way from QGraphicsPolygonItem to QPixmap.