Results 1 to 3 of 3

Thread: QGraphicsItem problem

  1. #1
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default QGraphicsItem problem

    Hi everybody,

    I have an interesting problem regarding the thread subject. I implemented paint method of graphics item so that to make the item orange when the mouse is over the item. But the problem is - whenever I make the mouse over the item, the item becomes orange for 3-4 seconds and then it becomes it's default color black. When I make the mouse over the item again it does the same thing..

    It may be very application specific problem but I want to hear your opinions about this problem if you have any.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsItem problem

    Please show relevant code.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jun 2010
    Location
    Italy
    Posts
    10
    Qt products
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsItem problem

    I had a similar problem,
    but I solve it implementing the

    shape
    paint
    boundingRect
    in the QGraphicsItem

    Regards
    Matteo

Similar Threads

  1. QGraphicsItem scale problem
    By qlands in forum Qt Programming
    Replies: 5
    Last Post: 9th June 2010, 16:43
  2. Having problem with QGraphicsItem
    By Kingofhearts_sri in forum Qt Programming
    Replies: 4
    Last Post: 23rd January 2009, 19:10
  3. Problem with rotation of QGraphicsItem
    By ashishsaryar in forum Qt Programming
    Replies: 2
    Last Post: 10th July 2008, 15:03
  4. QGraphicsItem::hoverEnterEvent problem
    By xgoan in forum Qt Programming
    Replies: 3
    Last Post: 24th February 2007, 15:21
  5. Problem with rotating QGraphicsItem
    By petrus in forum Qt Programming
    Replies: 2
    Last Post: 22nd January 2007, 04:22

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.