Problem process:
In the last few days, I encountered a small bug in changing the QT-based set-top box GUI program. One problem was that on the system settings page, I pressed the System Upgrade button. When the upgrade file cannot be found, an error message dialog box is displayed. After I press the remote control to confirm, the screen will be stuck. Press the remote control, but the key code for receiving the remote control is displayed on the Super Terminal. After asking the teacher, the original reason is: In the my destructor update dialog box, after the error message dialog box, the focus of the remote control message is transferred to the main window, rather than the system setting window. So I obtained the system setting object in the destructor in the update dialog box and called the setfocus () function to pass the focus to the system setting form. The problem is solved.
Summary:
When the GUI screen is stuck and cannot be controlled, but the Remote Control Message key code (correctly received by the remote control) is displayed on the terminal, the focus is set to the correct form.