[Qt-interest] Unable to set the Geometry of the QGraphicsView widget at Run Time

Kamakshi Sivaraman Kamakshi.Sivaraman at lntinfotech.com
Thu Apr 30 12:21:08 CEST 2009


Hi,

It worked, Thanks.

Regards,
S.KAMAKSHI
Larsen & Toubro Infotech Limited
Whitefield,
Bangalore -560066

Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com

This Document is classified as: 

L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech 
Internal Use Only   L&T Infotech General Business 

This Email may contain confidential or privileged information for the 
intended recipient (s) If you are not the intended recipient, please do 
not use or disseminate the information, notify the sender and delete it 
from your system. 



chandrasekar wagmare <sekarwagmare at gmail.com> 
04/30/2009 03:42 PM

To
Kamakshi Sivaraman <Kamakshi.Sivaraman at lntinfotech.com>
cc

Subject
Re: [Qt-interest] Unable to set the Geometry of the QGraphicsView widget 
at Run Time







we need the method by which u are updating the graphicsView() geometry ...
       did u reimplement the resizeEvent ()

void graphicsview::resizeEvent(QResizeEvent *event)
{
        QGraphicsView::resizeEvent(event);
        fitInView(scene->sceneRect(), Qt::KeepAspectRatio);
}  

because i succeed in updating the view geometry in runtime wrto desktop 
size ...

 ok just try like this use a small timer and call a single slot after one 
minute .. there in slot update the geometry of view .... check if this one 
works fine ... 

On Thu, Apr 30, 2009 at 2:15 PM, Kamakshi Sivaraman <
Kamakshi.Sivaraman at lntinfotech.com> wrote:

Hi, 

No I am not using any Timer, In Constructor I have mentioned by checking 
few conditions. 
Using setGeometry(0,0,width,height); 
where width and heigth values will vary at run time. 

Thanks & Regards,
S.KAMAKSHI
Larsen & Toubro Infotech Limited
Whitefield,
Bangalore -560066

Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com

This Document is classified as: 

L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech 
Internal Use Only   L&T Infotech General Business   

This Email may contain confidential or privileged information for the 
intended recipient (s) If you are not the intended recipient, please do 
not use or disseminate the information, notify the sender and delete it 
from your system. 


chandrasekar wagmare <sekarwagmare at gmail.com> 
04/30/2009 01:51 PM 


To
Kamakshi Sivaraman <Kamakshi.Sivaraman at lntinfotech.com> 
cc
qt-interest at trolltech.com 
Subject
Re: [Qt-interest] Unable to set the Geometry of the QGraphicsView         
widget at Run Time








how u are updating the setGeometry() function ... for ex: using QTimer 
slot ...?


On Thu, Apr 30, 2009 at 12:18 PM, Kamakshi Sivaraman <
Kamakshi.Sivaraman at lntinfotech.com> wrote: 

Hi All, 

Currently I am working with QGraphicsView as widget and by default the 
geometry is (0, 0, 916, 850) and 
maximum size of the widget is set to (16777215, 16777215). 

Now I need to set the geometry of the above widget at Run Time,I have 
increased the width and height , 
but it is not getting reflected even thought the sizes of width and height 
is less than maximum size. 

For E.g. 
At Run Time the value of widget's geometry is changed to (0,0,916,2400) by 
using setGeometry() function. 
But Still the widget remains with its default geometry. 

Please help. 



Thanks & Regards,
S.KAMAKSHI
Larsen & Toubro Infotech Limited
Whitefield,
Bangalore -560066

Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com

This Document is classified as: 

L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech 
Internal Use Only   L&T Infotech General Business   

This Email may contain confidential or privileged information for the 
intended recipient (s) If you are not the intended recipient, please do 
not use or disseminate the information, notify the sender and delete it 
from your system. 
______________________________________________________________________

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




-- 
CHANDRU

______________________________________________________________________ 

______________________________________________________________________



-- 
CHANDRU

______________________________________________________________________


______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090430/0f919917/attachment.html 


More information about the Qt-interest-old mailing list