Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML Singleton causes app to hang at launch

QML Singleton causes app to hang at launch

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xargs
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DeeeZ
      wrote on last edited by
      #2
      1. Did you try to use an empty QtObject instead of an empty Item ?

      2. Did you try to add this new singleton in another directory ?

      1 Reply Last reply
      0
      • X Offline
        X Offline
        xargs
        wrote on last edited by
        #3

        [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?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DeeeZ
          wrote on last edited by
          #4

          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 ???

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved