[Qt-interest] Displaying QGraphicsWidget
nandita-a.mehta at nokia.com
nandita-a.mehta at nokia.com
Fri Nov 19 13:14:52 CET 2010
Hi,
I want to display QGraphicsWidget that contains QPixmap on the click of the button.
Something like
QGraphicsWidget *defaultContent = new QGraphicsWidget(); //the content on which images are set
QPixmap pixmap;
pixmap.load("c:/data/FeatherTexture.bmp");
QPixmap scaledPixmap = pixmap.scaled((mImageView->size().toSize()), Qt::KeepAspectRatioByExpanding);
qDebug("mycamera_pixmapscaled()");
QGraphicsPixmapItem *pixmapItem = new QGraphicsPixmapItem(scaledPixmap, defaultContent);
// Load the mContent into the scroll area.
defaultContent->setPreferredSize((pixmapItem->boundingRect().size()));
and then displaying defaultContent.
Any suggestion?
Thank you
Regards,
Nandita
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101119/6a296eaf/attachment.html
More information about the Qt-interest-old
mailing list