How to pop up a window for searching when press any key for a char?
Solved
General and Desktop
-
The main window has many child controls, any key for a char (e.g. a letter or a number) can pop up a search window even the focus is on a child widget, with some exceptions (e.g. when the focus is on a text editor, the text editor should work normally instead of poping up the search window).
How to implement this?Problem
When focus is on a button,
keyPressEvent
event in the main windows is called, it is as expected.
But when focus is on aQTreeView
derived class,keyPressEvent
event in the main window is NOT called, it is not as expected.