[Qt-interest] vertical scrollbar subtraction from the screen width

Sujan Dasmahapatra sdh at lmwindpower.com
Wed Feb 16 07:57:31 CET 2011


 

Dear Friends

 

I have a Qwidget and a QScrollBar is holding that widget using
setWidget(widget) function.

 

When my screen is half some portion of the widget is getting out of
scope so a scrollbar is coming. When the screen is full the widget can
very well accommodated in the screen so I don't want a scrollbar to come
but its still coming for a very small variation. I came to know its
because of the vertical scrollbars height itself. So when I set the
geometry I am doing like this below

 

PageWidget::PageWidget(QScrollArea *parent)

{

desk = new QDesktopWidget;

page_width =  desk->width();

page_height = desk->height();

setGeometry(0,0,page_width-pageforgraph->verticalScrollBar()->height(),h
gth);

}

////////////////////////////////////////////////////////////////////////
//////////

Now because of this code I can when my screen is full no scrollbar is
coming. But just after the vertical scrollbar 1 very small portion of
left.....I am subtracting only the height but some extra amount has been
subtracted I think. Can anyone tell me how can I resolve this. I want
only the exact amount of height of the scrollbar to be subtracted .

Please see the attachment picture. Look at the extreme right vertical
scrollbar and some portion left after that. Any help would be
appreciated. Thanks sujan

 

 

 

Kind Regards,

 

 

Sujan Dasmahapatra
Project Leader, Aero Group
Aero Group

Tel    +91 80 66470248
Mob  

sdh at lmwindpower.com <mailto:%25EMAIL%25> 

 

LM Wind Power Blades

lmwindpower.com

 

Together we capture the wind to power a cleaner world

________________________________

 

This e-mail and any attachments are confidential. If you are not the
named or intended recipient, please notify the sender immediately and do
not disclose the contents to any other person, use it for any purpose,
or store or copy the information in any medium. Any unauthorized
disclosure, use or storage is prohibited and might be unlawful.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110216/54d9bfe3/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scrollproblem.jpg
Type: image/jpeg
Size: 150269 bytes
Desc: scrollproblem.jpg
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110216/54d9bfe3/attachment.jpg 


More information about the Qt-interest-old mailing list