[maemo-developers] Qt Autorotation

From: Felipe Crochik felipe at crochik.com
Date: Thu Jun 3 01:39:31 EEST 2010
Hi, 

It seems to me that this is an "unintended positive side effect" instead of
a planned requirement. I pass the mainwindow pointer to my dialog
constructors and this should set the parent.

By reading the documentation setParent should be quite useless in this
scenario because I would be changing the parent to the exact same one
assigned previously. I believe it just happens to work because setParent
will hide the just created dialog and then when you call exec or show it
will probably trigger the "window manager" recognizing this window as part
of an autorotation application and adjusting it accordingly.

Regardless, it was a good catch. It will probably help saving a bunch of
useless lines of code trying to remedy this issue and hopefully on a new
release it will be fixed so we don't need to artificially "reset" the parent
to make the manager adjust the window.

I would say that it is probably worth reporting this as a bug on the
qt/nokia web site. Have you reported it?

Thanks for updating us on your findings
Felipe

-----Original Message-----
From: Stefanos Harhalakis [mailto:v13 at v13.gr] 
Sent: Wednesday, June 02, 2010 6:08 PM
To: Felipe Crochik
Cc: maemo-developers at maemo.org; Luca Donaggio
Subject: Re: Qt Autorotation

Hello,

On Thursday 27 of May 2010, Felipe Crochik wrote:
> Luca,
> I ran into the same issue - the new windows always start on landscape -
and
> used the same workaround - checked the screen resolution and when taller
> set the portrait attribute. And yes, I believe you are right, setting the

I had the same problem but it proved to be my fault. If you are using
QDialogs 
like me then you only have to be sure that you're setting the main window
(the 
one with the portrait mode support) as the parent window. This will give
nice 
portrait support and QDialogs will start in the proper condition.

More information about the maemo-developers mailing list