QML Singleton causes app to hang at launch
-
I have several Singletons in my app, and I just added a new one, along with its entry in qmldir. It consists of nothing but an empty Item. It is not referenced anywhere in the code. I ran my app, and it worked fine.
Then I added the 'import "."' required by QTBUG-34418 to the new Singleton, knowing that it would need to reference other Singletons.
Upon running my app again, the ApplicationWindow doesn't open. Nothing happens; no feedback at all, but the process is running. When I remove the import statement and run again, it works fine.Has anyone seen this?
-
-
Did you try to use an empty QtObject instead of an empty Item ?
-
Did you try to add this new singleton in another directory ?
-
-
[quote author="DeeeZ" date="1413531513"]1) Did you try to use an empty QtObject instead of an empty Item ?[/quote]
An empty QtObject behaves the same as an empty Item.[quote]2) Did you try to add this new singleton in another directory ?[/quote]
Putting the singleton in a subdirectory of "content" seems to work around the problem. Is there a limit on the number of singletons in one directory? -
bq. Is there a limit on the number of singletons in one directory?
I don't know. I suppose the limit is on the developper side since it's not so great to have a lot of singleton
About the initial problem perhaps there is an order to follow. Since the last singleton use other ones, they must be created/available before the last one ???