[Qt-interest] Returning arbitrary value with?QApplication::exit ()
Andreas Pakulat
apaku at gmx.de
Fri Jun 26 21:43:23 CEST 2009
On 26.06.09 15:22:45, Pascal Patry wrote:
> On Friday 26 June 2009 15:09:59 Andreas Pakulat wrote:
> > I don't think its safe to re-create QApplication, AFAIK this can lead to
> > subtle hard-to-track bugs later on.
> >
> > Andreas
>
> I don't want to say that this kind of design is wrong, neither that you are,
> but I think that developing a software thinking that a particular class cannot
> be instantiated again once destroyed is a mistake.
Well, we're not talking about just any class. QApplication is certainly
special in this sense. It does a lot of setup stuff to actually make the
whole Qt "magic" work. Some of these things might not easily be
reversible and hence re-doing them might cause unknown or undefined
behaviour.
Andreas
--
You will gain money by an immoral action.
More information about the Qt-interest-old
mailing list