-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.3
-
Symbian^3 for sure, but same kind of issues seen also on older platforms
-
d7d9a14de00f9391ab0be953357d24713f580675
This issue was originally seen in the "camera" example application in QtMobility when showing the captured image. (internal: MOBILITY-2677)
After thorough investigation it seems like it's caused by the fact that the widget to be hidden has a native window.
Attached test application can be used to reproduce the issue.
It was reproducible with the camera example both with QMainWindow and QWidget as application base.
Before hiding the native child the application main window is the active window and one of it's children has focus.
After hiding, both active window and focus widget are NULL.
It may also be that the issue is specific to this certain kind of case, i.e. it may not occur in all cases if hiding a widget with native window.
Workaround for the issue is to activate the main window after hiding the native child:
qApp->setActiveWindow(this);
Fix for this would be nice to have as the use case from cameras point-of-view is quite common (hiding a viewfinder - that has always a native window in QtMobility on Symbian), but since the workaround is very easy and seems to work I'm not seeing this as a show stopper.