tags:

views:

315

answers:

2

I want to do some custom processing when the orientation of the phone changes. I have re-implemented the resizeEvent(QResizeEvent*) virtual function in my class. The strange thing is, for the first one time when the phone orientation is changed, this function is actually called, and works fine.

But all subsequent orientation changes, this function isn't even called? Why does this happen?

Are there any other ways to detect phone orientation change?

Thanks.

+1  A: 

Did you have a look at resized() or workAreaResized() of QDesktopWidget?

guruz
Hmm... I'll take a look at that and get back. Not sure how it could be used in Symbian.
trex279
Why? Just use it as you would use it on the Desktop.
guruz
+2  A: 

I suspect the original poster already knows this but it may help others. Recently the Qt Mobility project released its first set of APIs. In the Sensor APIs, you'll find QOrientationReading.

John