Results 1 to 8 of 8

Thread: QGraphicsView no refreshement

  1. #1
    Join Date
    May 2011
    Posts
    18
    Thanks
    2

    Default 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

  2. #2
    Join Date
    Nov 2010
    Posts
    315
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanked 53 Times in 51 Posts

    Default Re: QGraphicsView no refreshement

    You have done something wrong! Show your code!

  3. #3
    Join Date
    May 2011
    Posts
    18
    Thanks
    2

    Default Re: QGraphicsView no refreshement

    Well I got about 50 files so it's gonna be complicated, but If you just create a QGraphicsView and apply a blur effect on it, it does not work.

    Qt Code:
    1. QGraphicsBlurEffect *effect = new QGraphicsBlurEffect() ;
    2. graph->setGraphicsEffect(effect);
    To copy to clipboard, switch view to plain text mode 

    Note that it perfectly works on classical widgets. Taht's why I think QGraphicsView is the problem and it's because of it's refeshments.
    Last edited by wysota; 31st May 2011 at 11:37. Reason: missing [code] tags

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QGraphicsView no refreshement

    So you are stacking two views one over another? Isn't it easier to just add the items from this additional view to the original scene?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    May 2011
    Posts
    18
    Thanks
    2

    Default Re: QGraphicsView no refreshement

    Nope because in my application a view could be over two others thats why it's got to be over.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QGraphicsView no refreshement

    The problem is that's not how widgets work and if you want composition, it will be hard to obtain such an effect. Why do you need a view to be over two others? Why don't make them all a single view/scene?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    May 2011
    Posts
    18
    Thanks
    2

    Default Re: QGraphicsView no refreshement

    I want the user to be able to work on several subwindows, that way I use a QMdiArea and a QGraphicsView in each of them.
    Then I want that when the user ask to pop up an option window over this QmidArea and blur all the rest of the application.

    Maybe I'm just too ambitious...!

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QGraphicsView no refreshement

    I fail to see how this requires stacking graphics views onto each other.

    As for bluring the background -- you should just make your dialog modal and leave handling the visual effects to the desktop system. I personally don't like when some application tries to convince me it knows better what's good for me. If I want blocked windows blurred, I'll set it up in my window manager.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QGraphicsView transparent over another QGraphicsView
    By evergreen in forum Qt Programming
    Replies: 0
    Last Post: 30th May 2011, 10:22
  2. Replies: 0
    Last Post: 10th January 2011, 09:42
  3. QGraphicsView
    By Maluko_Da_Tola in forum Newbie
    Replies: 1
    Last Post: 24th July 2010, 05:40
  4. QGraphicsView
    By Maluko_Da_Tola in forum Newbie
    Replies: 1
    Last Post: 20th July 2010, 18:56
  5. QGraphicsView
    By Maluko_Da_Tola in forum Newbie
    Replies: 11
    Last Post: 19th July 2010, 08:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.