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

Zeljko zeljko at holobit.net
Thu May 5 10:06:46 CEST 2011


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.

After calling showMaximized() , and before ask X11 for geometry call syncX() so 
at the time of calling geometry you'll get complete widget geom, or reimplement 
resize event.

zeljko



More information about the Qt-interest-old mailing list