That is a correct behaviour.The program is not waiting till I click on lline edit. As soon as I open the TME_COM screen it's entering the event filter function. But I don't want that, whenever I click on line edit it should enter the event filter function.
An event filter gets all the events for the filtered widget.
In the function it self, as you are doing, you should filter out the event you want to handle.
So that is ok.
The warning you get tells you what the problem is - you have defined 'isQlineEdit' but you don't use it.
Just delete that line and the warning will go away.
Try 'QEvent::EnterEditFocus' instead of 'QEvent::FocusIn'
Well, nothing is 'of course' when you try to debug code you can't seeYes, Of-course I've called installEventFilter() for the line edits.![]()
Bookmarks