Getting QWidget's Windows messages without subclassing it and reimplementing QWidget::winEvent

StackOverflow https://stackoverflow.com/questions/16499233

Is it possible to intercept QWidget's Win messages without reimplementing QWidget::winEvent? Is there something like installEventFilter but for Windows native messages?

有帮助吗?

解决方案

You can install a native message event filter function at the application level with QAbstractEventDispatcher::instance()->setEventFilter() (see the documentation).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top