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.
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.
Did you have a look at resized() or workAreaResized() of QDesktopWidget?
精彩评论