Important: Please read the Qt Code of Conduct -

QApplication Algorithms (exec, notify , ….) ?

  • I am looking for a document describing in detail the algorithms of QApplication::exec() , QApplication::notify, and when exactly QApplication Event Filter is called . I know I could have a look at the source code, but if you have such a document, I would appreciate.

    The reason why I want to investigate this point is that I just realized that my understanding of these algorithms was wrong. Indeed, I activated some traces and I saw that when an event when propagated to parents, nofity() was called only one time and the EventFilter of QApplication was called as many times as the event is propagated. I thought I was the reverse.

  • Moderators

    I doubt that such a document exists. The source code it probably your best bet.

  • Thanks, I don't think i will do this in the near future :)
    Putting the same event filter (that only displays the event and the object) in all objects of my GUI gave me a good picture of what's going on.
    But I really don't understand what notify() does as , unless my trace code is bugged, notify() is called only one time when the event is propagated many times, which contradicts my understanding of notify() from documentation. Never mind, i can live with this.

  • Moderators

    I don't know if you would find it helpful or not, but there is an old Qt Quarterly article on events that has a pretty good in-depth discussion in general terms "here.":

Log in to reply