Results 1 to 4 of 4

Thread: Drawing QGraphicsSvgItem from center

Threaded View

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

    Default Re: Drawing QGraphicsSvgItem from center

    when setting the item position,,, why cant u set it like this..

    say scenePos = mouse position in scene.
    itemPos = scenePos.adjusted(-item.width/2 , -item.height/2);
    u can manipulate the itemposition in this way. seems u are just setting the position of item at scene position of mouse click.
    dont forget to check the boundary lies in scene or not
    Hope it helps

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

    Mhondoz (14th March 2008)

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.