[Qt-interest] QScrollArea Help
yogesh upreti
yogesh.upreti at gmail.com
Thu Apr 22 17:38:07 CEST 2010
I think I have the answer. see
http://www.qtforum.org/article/17562/showing-image-in-qscrollarea-please-help.html?s=dd436d94a5da6244e4c7a0ef1610c4cf24cd0b65
I haven't tried it yet, but its good information posted in net..
I will try it and let reply in group about this
On Thu, Apr 22, 2010 at 10:59 AM, Denis Akhmetzyanov <
dakhmetzyanov at smartlabs.tv> wrote:
> 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/24b4dfcd/attachment.html
More information about the Qt-interest-old
mailing list