Results 1 to 2 of 2

Thread: No QProxyScene ???

  1. #1
    Join Date
    Feb 2007
    Posts
    24
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default No QProxyScene ???

    Hi all,

    In the GraphicsView framework, I don't see the analogous to a QProxyModel of the ModelView framework.
    This can't be true.. can it?
    What am I missing here?
    Do you have efficient hints on how I should implement filtering a scene's items from view to view in my app?

    Thanks,
    ~travlr
    Last edited by travlr; 15th April 2009 at 21:02. Reason: updated contents

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

    Default Re: No QProxyScene ???

    That's simple. Reimplement QGraphicsView::drawItems(), filter the input arguments and call the base class implementation with the new data. Just remember this only influences drawing. If you want to do the same for interaction, you need to reimplement the event handlers for the view and make sure events "omit" the items that are filtered out.
    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.


  3. The following user says thank you to wysota for this useful post:

    travlr (16th April 2009)

Similar Threads

  1. Strange thing after override paintEvent function
    By Sheng in forum Qt Programming
    Replies: 9
    Last Post: 20th February 2009, 16:44
  2. Very strange thing
    By Sheng in forum Qt Programming
    Replies: 4
    Last Post: 21st October 2008, 22:44
  3. Replies: 5
    Last Post: 11th March 2008, 13:38
  4. strange thing with a toolbar
    By mickey in forum Qt Programming
    Replies: 8
    Last Post: 19th July 2006, 21:16

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.