Results 1 to 4 of 4

Thread: Reshape graphic items

  1. #1
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post Reshape graphic items

    Hi,
    I have graphic items on graphics scene and i can drag and drop.now i want to reshape that graphics items and again have to drag and drop. Please tell me how to reshape that items.
    Thanks in advance

  2. #2
    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: Reshape graphic items

    Maintain some shape, and use that to draw in boundingRect() or shape() .
    So when you need to change shape, you can easily update the member variable

  3. #3
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post Re: Reshape graphic items

    Thanks for yours quick reply. I think u misunderstood my problem

    my problem is suppose i have one circle. now i have to change it as a ellipse or some other shape by drag control points. How to develop this shape change.

  4. #4
    Join Date
    Aug 2008
    Posts
    134
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reshape graphic items

    inherit QGraphicsItem and override paint() event. In paint() draw as you want....

Similar Threads

  1. Some menubar items can not be clicked
    By richardander in forum Qt Programming
    Replies: 4
    Last Post: 11th March 2009, 00:26
  2. Use delegate to draw different type of items
    By nifei in forum Qt Programming
    Replies: 1
    Last Post: 19th January 2009, 13:16
  3. Light items for the graphicsView
    By maverick_pol in forum Qt Programming
    Replies: 12
    Last Post: 1st November 2007, 18:51
  4. How to restrict graphic items in view
    By aamer4yu in forum Qt Programming
    Replies: 4
    Last Post: 13th November 2006, 07:46
  5. Selective highlighting of Items
    By Kapil in forum Qt Programming
    Replies: 3
    Last Post: 26th May 2006, 12:20

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.