Results 1 to 10 of 10

Thread: Blinking QGraphicsTextItem text in QGraphicsView widget?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Blinking QGraphicsTextItem text in QGraphicsView widget?

    I mean kill the timer when item is hidden and start it again when it is shown. The itemChanged() method provides needed data.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Blinking QGraphicsTextItem text in QGraphicsView widget?

    How comes startTimer and timerEvent are available in MyTextItem even though it and its ancestors do not inherit from QObject? and it is only QObject that provides these methods.
    I am pretty confused about the fact that the code compiles at all!

  3. #3
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Thanks
    37
    Thanked 53 Times in 40 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Blinking QGraphicsTextItem text in QGraphicsView widget?

    Quote Originally Posted by momesana View Post
    How comes startTimer and timerEvent are available in MyTextItem even though it and its ancestors do not inherit from QObject? and it is only QObject that provides these methods.
    I am pretty confused about the fact that the code compiles at all!
    QGraphicsTextItem inherits QObject.
    Look QGraphicsTextItem
    The biggest difference between time and space is that you can't reuse time.
    -- Merrick Furst

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Blinking QGraphicsTextItem text in QGraphicsView widget?

    Quote Originally Posted by Gopala Krishna View Post
    QGraphicsTextItem inherits QObject.
    Look QGraphicsTextItem
    You are right. I must have been blind when going through its documentation or maybe I had unintentolly clicked on the QGraphicsItem documentation in assistant.

    Thank you.

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. Creating a widget on a QGraphicsView
    By maverick_pol in forum Qt Programming
    Replies: 4
    Last Post: 9th August 2007, 17:54
  3. Editable text in QGraphicsView
    By wysota in forum Qt Programming
    Replies: 8
    Last Post: 24th February 2007, 15:30

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.