QGraphicsView no refreshement



  • 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



  • 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 :-)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.