How to pop up a window for searching when press any key for a char?
-
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,
keyPressEventevent in the main windows is called, it is as expected.
But when focus is on aQTreeViewderived class,keyPressEventevent in the main window is NOT called, it is not as expected. -
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,
keyPressEventevent in the main windows is called, it is as expected.
But when focus is on aQTreeViewderived class,keyPressEventevent in the main window is NOT called, it is not as expected.