Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Hidden QML application does not redraw when unhidden
foxysounds last edited by
I have a QML application running on Windows 7 and Windows CE 5. I'm using Qt 4.7.4 (because Qt 5 and upwards drops support for Windows CE5 and there has been no compelling reason to update all of the deployed embedded devices to Qt 4.8).
In certain circumstances I need to hide my application in an OS-friendly way so that another application can be used. Later I want the other application to be able to find it by its window handle and show it again.
All of this is working except that when the application is shown again it does not redraw (I just get a blank window). My application is based on a QMLViewer so I have tried writing my own class which inherits from QMLViewer and reimplements the setVisible method. However, although this is getting called when the application first starts and is called again when it gets hidden, it does not get called when the application is shown again.
I have also tried reimplementing the showEvent but this is called only when the application first starts and, once again, is not called when the application is shown after being hidden.
The problems I describe above occur on both CE5 and Windows 7.
Extensive internet searches have not revealed anyone else reporting this exact issue so I can only assume I'm missing something obvious but I can't figure it out so if anyone can shed any light on the issue I would really appreciate it.