QCoreApplication::notify 重载的问题
继承链情况:
QApplication : QGuiApplication : QCoreApplication
在QApplication中对notify有了重新实现。
例如:
QCoreApplication::sendEvent( QWidget *widget, QEvent *e)
调用QApplication的notify
QCoreApplication::sendEvent(Qwinodw *window, QEvent *e)
会调用基类QCoreApplication的notify
具体调用时序:
inline bool QCoreApplication::sendEvent(QObject *receiver, QEvent *event)
bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event)
|---------------------------bool QCoreApplication::notify(QObject *receiver, QEvent *event)
|--------------------------bool QApplication::notify(QObject *receiver, QEvent *e)
注明:版本Qt5.3
QWindow位于src/gui
Qwidget 位于src/widget