Results 1 to 5 of 5

Thread: QGraphicsItem independent of scene transformation

  1. #1
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QGraphicsItem independent of scene transformation

    Hi,

    Can any one help me of painting a QGraphicsItem which should not change when the QGraphicsScene changes its rect() ..

    ex:
    i want to increace the size of the QGraphicsScene rect ... but one particular QGraphicsItem (currently i customize it ..) should not change ..


    cna any one please help me ..

    Thanks in advance ..... !!
    "Behind every great fortune lies a crime" - Balzac

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

    Default Re: QGraphicsItem independent of scene transformation

    What do you mean that it should not change? How does it change?
    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.


  3. The following user says thank you to wysota for this useful post:

    wagmare (19th January 2012)

  4. #3
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsItem independent of scene transformation

    thanks wysota ...
    actually i want to ignore the transformation of item in scene ...
    i used ignore transformation flag in the graphicsItem...


    Added after 5 minutes:


    and im having the problem that .. if i try to rotate my graphicsItem ... it is shifting a little in y() also ...

    Ex:
    i tried to rotate a graphicsItem like a pendulum ...
    i tried
    item->setRotation(10);

    but when it rotates it add its y() coordinates .. it is not rotating in constant axis ....

    i need some suggestion ...

    please help me ..

    Thanks in advance ..
    Last edited by wagmare; 19th January 2012 at 05:19.
    "Behind every great fortune lies a crime" - Balzac

  5. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QGraphicsItem independent of scene transformation


  6. The following user says thank you to Lykurg for this useful post:

    wagmare (19th January 2012)

  7. #5
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsItem independent of scene transformation

    Thanks Lykurg ... this i want ... i will give u the result soon ....
    "Behind every great fortune lies a crime" - Balzac

Similar Threads

  1. QGraphicsItem .. Scene .. View question?
    By DirtyBrush in forum Qt Programming
    Replies: 21
    Last Post: 19th October 2010, 09:12
  2. Problem with positioning a QGraphicsItem in the scene
    By qlands in forum Qt Programming
    Replies: 0
    Last Post: 1st October 2010, 11:05
  3. Scale independent QGraphicsItem
    By Twoslick in forum Qt Programming
    Replies: 3
    Last Post: 24th March 2010, 05:59
  4. Overload QGraphicsItem Move in Scene
    By D Cell in forum Newbie
    Replies: 2
    Last Post: 16th March 2010, 05:14
  5. Can I copy a QGraphicsItem on my scene?
    By JesperWe in forum Qt Programming
    Replies: 3
    Last Post: 12th February 2010, 21:21

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.