Results 1 to 9 of 9

Thread: View with flow chart?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: View with flow chart?

    You have to override the item's mousePressEvent.
    Take a look at the protected functions in the QGraphicsItem class.

  2. #2
    Join Date
    May 2007
    Posts
    301
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    46
    Thanked 3 Times in 3 Posts

    Default Re: View with flow chart?

    Many thanks for your help Marcel,

    Going to have a derived class from QGraphicsItem, override paint and boundingRect and the mousePressEvent. I did notice that it would also be possible to create a slot in the main window which could be emited from the scene when an item is selected ( capture the mouseEvent within the scene ) - although I think just overriding the mousePressEvent within the subclassed QGraphicsItem class seems simpler.

    Regards,
    Steve

Similar Threads

  1. Model, View and Proxy
    By No-Nonsense in forum Qt Programming
    Replies: 2
    Last Post: 21st November 2006, 08:50
  2. Replies: 2
    Last Post: 29th October 2006, 07:54

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.