[Qt-interest] Is the bug for QWidget size after showMaximized()

Pritam Ghanghas pritam_ghanghas at infosys.com
Wed May 4 16:33:15 CEST 2011


Hi

why do you need geometry immediately after showMaximized().
if you are painting something, then do it in paintEvent()
reimplimentation, that fucntion is called only when widget is visible
and at that time it will have proper geometry also(this->rect()). Or if
you want to know when geometry changes you can reimpliment
resizeEvent().


-- 
Pritam


On Wed, 2011-05-04 at 08:27 +0530, lvbing lvbing wrote:
> Hi everyone:
> I have a QWidget,splitter into two QWidget. In the childWidget,I will
> paint some image line the table or other,and the 
> size of the image will be fit to the childWidget.
> So I need to know the size of the childWidget agter call the
> showMaximized function.
> But the problem is :
> In Win32,I can get the correct size,but
> In Linux,I can't get the correct size.
> 
> 
> I search in assistant,it say:
> On X11, this won't work because an invisible window doesn't have a
> frame yet. 
> 
> 
> so How can I get the correct size after call the showMaximized? Is
> there any signal or function?
> 
> 
> Thanks.


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***



More information about the Qt-interest-old mailing list