经过QT网站研发人员告诉我,是我没有写返回值。下面是量为研发人员给的解决方法,
Don’t omit return value. This is undefined behavior and it’s a shame that some compilers allow you to compile that.
Explicitly return false at the end of your eventFilter.
Also, as SGaist said, you are eating the event by returning true. You should probably return false to let Qt handle it properly or call the base implementation yourself.
Hi and welcome to DevNet,
Could you show the code of your event filter ? You most likely eat all events in there so the button probably misses QEvent::StyleChange
Hope it helps