Results 1 to 2 of 2

Thread: Signals in QGraphicsItem

  1. #1
    Join Date
    Jul 2006
    Posts
    126
    Thanks
    17
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Signals in QGraphicsItem

    Is posible to use signals in QGraphicsItems? To send to interact with the scene?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Signals in QGraphicsItem

    Yes, but you have to derive your custom QGraphicsItem also from QObject like this:
    Qt Code:
    1. class MyGraphicsItem : public QObject, public QGraphicsItem // the order of base classes is important
    2. {
    3. Q_OBJECT
    4. public:
    5. ...
    6. };
    To copy to clipboard, switch view to plain text mode 

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

    xgoan (16th February 2007)

Similar Threads

  1. QGraphicsView, QGraphicsItem, QGraphicsScene
    By Shuchi Agrawal in forum Newbie
    Replies: 10
    Last Post: 23rd March 2011, 21:50
  2. destruction of QGraphicsItem
    By killkolor in forum Qt Programming
    Replies: 2
    Last Post: 5th December 2009, 11:31
  3. QGraphicsItem and signals
    By aamer4yu in forum Qt Programming
    Replies: 3
    Last Post: 27th December 2006, 12:19
  4. SIGNALS in Inherit Classes
    By ^NyAw^ in forum Qt Programming
    Replies: 2
    Last Post: 27th November 2006, 17:06
  5. KDE Signals
    By chombium in forum KDE Forum
    Replies: 1
    Last Post: 25th January 2006, 19:45

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.