コード例 #1
0
EventLoop::~EventLoop() {
    QMainWindow * wnd = StaticUtils::findMainWindow();
    if (wnd != NULL) {
        wnd->removeEventFilter(this);
        QObjectList childs = wnd->children();
        for (int i=0;i<childs.count();i++) {
            if (childs.at(i)->inherits("QWidget")) childs.at(i)->removeEventFilter(this);
        }
    }
}