>
> It's certainly one of the uglier gotchas people run into. Here is my humble 
> attempt to document it more prominently:
>
> https://codereview.qt-project.org/#/c/114517/
>
> Anyhow, adding stuff to the documentation only helps so much, since people 
> also have to read it :)
>
> In general, I consider deriving from Q*Application sort of an anti-pattern. 
> You fall for it because, hey, you're writing 'application logic' , so the 
> logic should go into something derived from *Application. Anyhow, unless 
> you're really overriding one of the virtual methods there's just no reason to 
> subclass. Just put your business logic in a separate, QObject based class. 
> This way you avoid all of this mess.
>

I have a large app and it is convenient to override this:

     bool MyApplication::notify( QObject*, QEvent* ) { }

To make it easier to find the source of wayward throws.
I think that is the only reason.

Bill

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to