[Development] A new approach for Qt main()
Tor Arne Vestbø
tor.arne.vestbo at qt.io
Fri Dec 9 14:10:03 CET 2016
On 09/12/2016 12:58, Eskil Abrahamsen Blomfeldt wrote:
> Den 09.12.2016 12:40, skrev Tor Arne Vestbø:
>> On 09/12/2016 11:44, Lars Knoll wrote:
>>> Well, the problem is that the main() entry point is causing huge amounts
>>> of issues on at least Android and iOS.
>> I don't know about Android, but on iOS this is patently false. While
>> the workaround is complex, it has worked very well in the 3 years
>> since its inception. Please don't use iOS as a straw-man in this
> Speaking for Android, there are and have been thread synchronization
> issues due to Qt running a synchronous event loop in the main function.
> It is also impossible to make applications with multiple entry points
> and complex life cycles, which you would expect in an Android
> application consisting of several activities and services that can be
> triggered independently and simultaenously. Our work-around for this is
> to limit support to applications with one activity or one service per
> process in the application.
> So while we have been able to find solutions for most our problems, both
> on Android and iOS, I guess Lars' point is that we are encountering more
> and more cases where we have to invent hacks and work-arounds and
> document limitations in order to be functional on modern platforms. It
> might be a sign that we should adapt.
Yes, I'm not disagreeing that a new model for Qt initialization would be
welcome, I was reacting to the swiping generalization Lars was making in
trying to make his point :-)
More information about the Development