Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QQuickPaintedItem thread-safe?
Qt 6.11 is out! See what's new in the release blog

QQuickPaintedItem thread-safe?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 322 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.
  • B Offline
    B Offline
    bee65
    wrote on last edited by
    #1

    I have a QQuickPaintedItem-derived object that does some painting, using data structures that are updated in UI and network event handlers.

    The documentation here warns that the paint method may be called in a different thread, but then states "At the moment paint() is called, the GUI thread is blocked and this is therefore thread-safe." I find this statement a bit vague. This does this mean that the paint thread is not preempted by the GUI thread, or that the GUI thread is not preempted by the paint thread, or both?

    Is the synchronization built into the GUI thread and Render thread sufficient for my use case, or should I add my own synchronization for access to the data structures?

    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