Results 1 to 6 of 6

Thread: QGraphicsItem-QGraphicsScene

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    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: QGraphicsItem-QGraphicsScene

    If you want to scale only the selected image( that item has to have the selectable flag ), independently of the other images, then you can catch keyboard event with QGraphicsItem::keyPressEvent.

    If you want to scale the entire scene at the same time, then you can catch key presses with QGraphicsScene::keyPressEvent.

    Please note that you have to subclass QGraphicsItem/QGraphicsScene and override keyPressEvent in order to be able to get key presses.

    Regards

  2. The following user says thank you to marcel for this useful post:

    hgedek (4th August 2007)

Similar Threads

  1. QGraphicsView, QGraphicsItem, QGraphicsScene
    By Shuchi Agrawal in forum Newbie
    Replies: 10
    Last Post: 23rd March 2011, 20:50
  2. destruction of QGraphicsItem
    By killkolor in forum Qt Programming
    Replies: 2
    Last Post: 5th December 2009, 10:31
  3. Replies: 4
    Last Post: 11th July 2007, 04:21
  4. When to use QGraphicsScene or QWidget
    By fossill in forum Qt Programming
    Replies: 2
    Last Post: 9th February 2007, 23:58
  5. (QT4.2-RC1) QGraphicsScene QGraphicsView QGraphicsItem
    By antonio.r.tome in forum Qt Programming
    Replies: 1
    Last Post: 20th September 2006, 10:56

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.