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 interface not fully initialised when main window is shown
Forum Updated to NodeBB v4.3 + New Features

QML interface not fully initialised when main window is shown

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 925 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.
  • C Offline
    C Offline
    cristeab
    wrote on last edited by
    #1

    Hi

    I have a mixed C++/QML application whose UI is written completely in QML. However, at startup, I have noticed that there are cases when the interface is displayed but some QML elements are not fully initialised, thus the entire application needs to be restarted. This happens rather randomly. Could you recommend a way to show the main window only when all QML components are fully initialised ? I am using Qt5.3 on OS X Yosemite.

    thanks
    Bogdan

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rolias
      wrote on last edited by
      #2

      This isn't enough information to go on. Can you create a small code sample that replicates the problem? In the meantime I'll take a stab in the dark. Having a long running process in the main GUI thread can cause problems. The UI won't properly display until the event handler is running. If you have some initialization task that takes a while then you need to use a worker thread to handle that and let your GUI thread complete.

      Check out my third course in the trilogy on Qt
      "Integrating Qt Quick with C++"
      http://bit.ly/qtquickcpp
      published by Pluralsight

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cristeab
        wrote on last edited by
        #3

        Unfortunately creating a sample application won't be possible because the application is quite complex. For now I am using a sleep() just before showing the application.

        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