Results 1 to 3 of 3

Thread: Adding signal to own model class

  1. #1

    Default Adding signal to own model class

    Hello,
    I'm writing my own model class (subclass of QAbstractTableModel).

    Is there possibility of adding new signal to such a class?
    When I build my project I get 'undefined reference' error in line, in which I'd like to emit my own signal.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Adding signal to own model class

    Did you define the signal in your header file?

  3. #3
    Join Date
    Apr 2010
    Location
    Rostov-na-Donu, Russia
    Posts
    153
    Thanks
    2
    Thanked 26 Times in 23 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Adding signal to own model class

    And did you include Q_OBJECT macro in the start of your class declaration ? Show us you code if yes.

Similar Threads

  1. Application crashes after adding a new class
    By wallace_000 in forum Newbie
    Replies: 1
    Last Post: 19th March 2010, 19:42
  2. error when adding signal slot to a QGLWidget based class
    By john_god in forum Qt Programming
    Replies: 2
    Last Post: 11th April 2009, 23:31
  3. Replies: 12
    Last Post: 18th September 2008, 15:04
  4. Limitation when adding more than 256 items to a model
    By darkadept in forum Qt Programming
    Replies: 5
    Last Post: 25th May 2006, 15:26
  5. Signal/slot looking in base class, not derived class
    By georgie in forum Qt Programming
    Replies: 2
    Last Post: 12th May 2006, 07:36

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.