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. QGraphicsView no refreshement
Forum Updated to NodeBB v4.3 + New Features

QGraphicsView no refreshement

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.5k 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
    evergreen
    wrote on last edited by
    #1

    Hi,
    I'm currently working with a QGraphicsView and I encounter some problems either when I try to put a transparent object over it or try to apply a blur effect.
    I 'm pretty sure that the reason is the same : the QGraphicsView always refreshes its display which messes with the transparency and the blur effect probably instantly desappear.

    So, I would like to know if there's a way to temporary stop a QGraphicsView (or the QGraphicsScene in it) to refresh. To somehow freeze its display.

    Thanks

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

      Hello,
      maybe this will help you
      @QGraphicsView->setViewportUpdateMode(QGraphicsView::NoViewportUpdate)@
      Update: or you can realise this func your self
      @
      void MyGraphicsView::freezePaint(bool freeze) { m_freezePaint = freeze; }

      void MyGraphicsView::paintEvent ( QPaintEvent * event )
      {
      if (!m_freezePaint)
      QGraphicsView::paintEvent(event);
      }
      @
      something like this :-)

      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