Some attributes only work if they are set before instantiating the app.
Also, use full QCoreApplication::setAttribute syntax, since it's a static member; and omit bool on = true value, because it's the default.