T
T
tschin2016-04-11 12:00:33
Qt
tschin, 2016-04-11 12:00:33

Why is InstallEventFilter hiding the widget?

Hello! Using eventFilter, I catch keystrokes on the keyboard. To avoid the situation when the focus goes to QPushButton when this button is clicked, I set installEventFilter for it: But in this case, this button disappears, commenting out this line, the button appears, but, of course, the eventFilter does not work. Why is InstallEventFilter hiding the widget? Qt version - 4.7.0 under Windows.
ui->button->installEventFilter(this);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Demonist, 2016-04-26
@tschin

It would be nice to see the eventFilter code .
Most likely in it you always return true , thus redefining all events, including drawing events - that's why the button disappears.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question