[Qt-interest] How to find full screen size
Girish Ramakrishnan
girish at forwardbias.in
Mon May 25 05:09:07 CEST 2009
Kushal Das wrote:
> Hi all,
>
> I am showing an image full using QGraphicsView and and then calling
> showFullScreen on the view. Now to show the image scaled to full
> screen properly I need to find out the full screen size. How can I do
> that ?
> If I try to get size of the graphicsview while it is full screen it is
> coming as 200, 100 :(
>
You shouldn't need to know the screen size. Is your QGraphicsView in a
layout? If so, it should get the correct size when it is full screen.
For the scaling, all you need to do is to call call
QGraphicsView::fitInView() in your QGraphicsView's resizeEvent().
Girish
More information about the Qt-interest-old
mailing list