Den 30-10-2014 20:30, Yili Pan skrev: > Hi: > > We want to block the widget's WindowActivate and FocusIn event > triggered by calling its show() function, with Qt4, we used to do > that by setting flag before and after show() and filter out the event > in eventfilter based on the flag. But with Qt5, the events are > processed asynchronously, we cannot block the event in the same way > anymore. > > Any ideas how I can identify those events that are caused by calling > QWdiget::show() and filter them out?
You can use an event filter for this. Take a look at the documentation for QObject::installEventFilter, it should be simple to follow. Bo. -- Viking Software Qt and C++ developers for hire http://www.vikingsoft.eu _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest