PDA

View Full Version : QFrame size



impeteperry
16th August 2007, 06:36
Hi. I'm glad you missed me.
Now I have a QFrame "frmDrawing" I want to know its width and height. (I always have had trouble with deciphering some of the documentation, particularly with QT 4)
If I use
Xa = frmDrawing->width();
Ya = frmDrawing->height(); I always get 100 x 30 which ain't right of course.
If someone would give the proper code for this I would be most thankful

wysota
16th August 2007, 09:48
Is frmDrawing visible when you query for the size?

impeteperry
17th August 2007, 06:26
Thanks
No it wasn't
It works when it is
Thanks

wysota
17th August 2007, 13:51
The size of the widget is calculated when it is shown for the first time. That's why you received bogus values.