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. Update of QML view stops in 64bit Win7 for unknown reason (QDeclarativeItem::update() does not result in paint() call)
Forum Updated to NodeBB v4.3 + New Features

Update of QML view stops in 64bit Win7 for unknown reason (QDeclarativeItem::update() does not result in paint() call)

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

    Hello,
    I work on a QML-based UI where some elements are implemented in C++ plugin. Everything works fine so far in WinXP 32bit and Win7 32bit, but there is a problem with Win7 64bit.
    Sometimes on some machines application suddenly stops redrawing the view several seconds after start-up. Neither QML-initiated events (like MouseArea handlers), nor plug-in calls to QDeclarativeItem::update() work. In plug-in I am 100% sure that update() is called, but then I know, that calls to overriden QGraphicsItem::paint() do not happen as expected. The view only gets redrawn when window gets/loses focus. My assumption is that OS-initiated redraw is done correctly, while Qt event system gets stuck internally, but I was not able to prove that from debugger.
    The problem is floating – sometime it happens quite persistently, sometimes it disappears. Behavior is not dependent on the code, as same code can run nicely on one machine, while freezing on the other.
    Can someone help me out to understand what is going on there and what debugging strategy I can use to find out where the problem lays?
    For technical details, we have QDeclarativeView placed inside a QDialog window. The view contains component from C++ plug-in, which is updated upon external event and shall be redrawn; normal user-initiated mouse events shall be handled as well. I don’t see anything extremely peculiar here.

    Thank you in advance!

    Best Regards,
    Sergei Eliseev

    1 Reply Last reply
    0
    • E Offline
      E Offline
      eliseev
      wrote on last edited by
      #2

      I have returned to this project after a break, and the problem persists. Anyone has good advice?
      Adding qApp->processEvents() does not help.

      What I think happens, is Qt's internal loop responsible for graphics scene update gets broken at some point, and quits to respond to internal update() request, while serving external requests such as WM_SETFOCUS and WM_KILLFOCUS on Windows. I really need Trolls' opinion because idea of debugging QGraphicsScene worries me :)

      1 Reply Last reply
      0
      • E Offline
        E Offline
        eliseev
        wrote on last edited by
        #3

        The only cause I could think of for this problem, was QDeclarativeItem::update() being called from non-Qt thread (callback coming from external DLL). I changed code to use Qt event loop via postEvent()/event() and for last day everything is alright for me. I shall test it more widely yet to make sure.

        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