Results 1 to 3 of 3

Thread: Resizing QGraphicsItems with the mouse?

  1. #1
    Join Date
    Jun 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Resizing QGraphicsItems with the mouse?

    I have been playing with the excellent graphics scene classes which easily allows you to create new items, select them with the mouse and then move them around the scene. Fantastic.

    However, it seems you cannot resize items using the mouse, so their size remains fixed. Is there something obvious I'm missing here or is it simply not possible? Ideally I'd like to be able to click on the bottom-right hand corner of a selected item and resize it using some form of QRubberBand.

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Resizing QGraphicsItems with the mouse?

    This capability is not provided. There are simply too many possible variants that would have to be provided to meet all needs. Can the object only be resized in one dimension, or both? Relative to the objects center, or some other fixed point? In item coordinates, scene coordinates, view coordinates or some other system? And that's just for starters.

    It isn't difficult to implement such a capability, though. Just override the appropriate mouse events on the item.

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Resizing QGraphicsItems with the mouse?

    Check for this Fotowall app on Qt-apps.org.
    There is code to resize item, and you get help from it .

Similar Threads

  1. Resizing QGraphicsItems [solved]
    By pherthyl in forum Qt Programming
    Replies: 4
    Last Post: 14th April 2017, 15:32
  2. Replies: 3
    Last Post: 2nd March 2010, 20:58
  3. Unselect QGraphicsItems
    By jano_alex_es in forum Newbie
    Replies: 1
    Last Post: 10th September 2009, 17:19
  4. Problems with QGraphicsItems
    By JonathanForQT4 in forum Qt Programming
    Replies: 5
    Last Post: 26th April 2007, 08:25
  5. QGraphicsItems on top of each other?
    By Morea in forum Qt Programming
    Replies: 2
    Last Post: 18th November 2006, 20:23

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.