[Qt-interest] implementing scrollbars
Avishek_Sharma
Avishek_Sharma at satyam.com
Wed Dec 17 12:17:15 CET 2008
Hi,
when implementing 'zoom in' facility,I want scrollbars to appear on the 'label' on which I am displaying the image(label is inside a form say 'Form1').
I am writing down the code for the zoom facility which I presently have with me.
void picture_display::zoomin()
{
QPixmap pm;
enum zoom_values
{
Zoom50, //Zoom50 , Zoom75,Backtonormal can be selected from a dropdown box
Zoom75,
BacktoNormal
};
switch(zoom->currentItem())
{
case Zoom50:
/* what and where to write to bring in the scroll bars*/
pm=pictureresize(path_of_pic,1500,600); //pictureresize() is a manually created function
//to resize pics
pic_display->setPaletteBackgroundPixmap(pm); //pic_display is the label on which I need to show
//the final enlarged pic with the scrollbars
break;
case Zoom75:
...................
}
I went over QScrollView and QScrollArea but couldn't understand the codes properly.
Please give me some idea on what to do.I need to do this for for Qt 3.3 and 4.3.
Thanks in advance.
regards,
Avi
________________________________
DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081217/4f217f8c/attachment.html
More information about the Qt-interest-old
mailing list