[Qt-interest] QScrollArea Help

Denis Akhmetzyanov dakhmetzyanov at smartlabs.tv
Thu Apr 22 10:59:48 CEST 2010


Hi,
Could you attach any code snippet? Is code from QScrollArea description
working well?

 QLabel *imageLabel = new QLabel;
 QImage image("happyguy.png");
 imageLabel->setPixmap(QPixmap::fromImage(image));

 scrollArea = new QScrollArea;
 scrollArea->setBackgroundRole(QPalette::Dark);
 scrollArea->setWidget(imageLabel);

Is Image Viewer Example
http://doc.qt.nokia.com/4.6/widgets-imageviewer.html working
well?


2010/4/22 yogesh upreti <yogesh.upreti at gmail.com>

> Hallo Group,
> I am having some problem using QScrollArea
> I have a QLabel inside which displays image inside, but when the image size
> is big Scroll area is not showing scroll bars.
> I have Scroll Bar Policy for QScrollArea as Qt::ScrollBarAsNeeded
> but still it dose't show scroll bar for a bigger image.
>
> Can someone help me?
>
> Thanks
> Yogesh Upreti
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>


-- 
Best regards,
Denis Akhmetzyanov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100422/8d1b1e6f/attachment.html 


More information about the Qt-interest-old mailing list