
Originally Posted by
high_flyer
This is something I don't quite understand, since QImage is not a visible object.
Can you show the relevant code of the QImage integration,and its painting?
{
Q_UNUSED ( option )
Q_UNUSED ( widget )
// Draw the image
painter->drawImage(_rect,_qImage); // _qImage is a member of the class
}
QRectF ImageItem
::boundingRect() const {
return QRectF(_rect
);
// _rect is the rect of the QImage }
void ImageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Q_UNUSED ( option )
Q_UNUSED ( widget )
// Draw the image
painter->drawImage(_rect,_qImage); // _qImage is a member of the class
}
QRectF ImageItem::boundingRect() const
{
return QRectF(_rect); // _rect is the rect of the QImage
}
To copy to clipboard, switch view to plain text mode
Bookmarks