Results 1 to 7 of 7

Thread: settransformoriginpoint not changing rotation point

  1. #1
    Join Date
    Mar 2010
    Posts
    63
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60
    Thanks
    6

    Default settransformoriginpoint not changing rotation point

    Hi,
    When I am trying to rotate QGraphicsitem ,its rotating around 0,0,
    But on changing traformation point by settransformoriginpoint(),It again rotating around 0,0.
    But my transform point get changed I checked by printing transformationpoint.
    I dont want to translate rotate and re translate.

    Please let me know if rotation ignore transformationpoint.

    Thanks

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    3
    Thanked 127 Times in 126 Posts

    Default Re: settransformoriginpoint not changing rotation point

    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  3. #3
    Join Date
    Mar 2010
    Posts
    63
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60
    Thanks
    6

    Default Re: settransformoriginpoint not changing rotation point

    Hi
    Please find sample attached code.
    I am just rotating item after setting transform postion.
    I tried with several transform pos.But i get same result.


    Thanks
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: settransformoriginpoint not changing rotation point

    Your example sets the transformation point to 0,0.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Mar 2010
    Posts
    63
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60
    Thanks
    6

    Default Re: settransformoriginpoint not changing rotation point

    Sir,
    I tried with different values also e.g.(40,40) you can check it in attached file,but I get same result as with (0,0).
    You can test with different value.And please let me know if i m wrong.



    Thanks
    Attached Files Attached Files
    Last edited by moh.gup@gmail.com; 29th January 2012 at 07:14.

  6. #6
    Join Date
    Jan 2012
    Posts
    66
    Platforms
    Windows
    Thanks
    20
    Thanked 2 Times in 2 Posts

    Default Re: settransformoriginpoint not changing rotation point

    Did you ever figure out why setTransformOriginPoint wasn't working for you?

  7. #7
    Join Date
    Mar 2010
    Posts
    63
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60
    Thanks
    6

    Default Re: settransformoriginpoint not changing rotation point

    No,I havent found the reason for setTransformOriginPoint not working,Its look like bug in Qt4.7.2.Then I change my strategy.

Similar Threads

  1. Replies: 3
    Last Post: 28th September 2014, 08:13
  2. Replies: 0
    Last Post: 28th September 2011, 23:18
  3. setTransformOriginPoint
    By brianc in forum Newbie
    Replies: 2
    Last Post: 17th August 2010, 00:26
  4. Replies: 1
    Last Post: 3rd December 2009, 14:23
  5. how to paint scene point by point
    By elessaar in forum Qt Programming
    Replies: 8
    Last Post: 4th September 2008, 20:00

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.