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. Purge Cache of QGraphicsItem
Forum Updated to NodeBB v4.3 + New Features

Purge Cache of QGraphicsItem

Scheduled Pinned Locked Moved General and Desktop
qgraphicsitem
1 Posts 1 Posters 624 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.
  • A Offline
    A Offline
    Asperamanca
    wrote on last edited by
    #1

    When using QGraphicsItem's cacheMode "DeviceCoordinateCache", I get some painting issues in a very specific case (combining of painting via QGraphicsView and QGraphicsScene::render).

    A simple solution would be to purge the cache of all items within the scene just before calling QGraphicsScene::render.
    I found an internal QGraphicsItemCache::purge(), but no way to invoke it from outside.
    One way to invoke it indirectly is to remember the cache mode, set it to NoCache, and set it back to the original cache mode. My headache for this is how to obtain the logicalCacheSize for those items with ItemCoordinateCache, so I can restore the original size.

    Any suggestions?

    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