Results 1 to 5 of 5

Thread: Signal from a library

  1. #1
    ucomesdag Guest

    Question Signal from a library

    Hi,

    How do I add a signal to a library?

    Tried:
    Qt Code:
    1. signals:
    2. virtual void mySignal();
    To copy to clipboard, switch view to plain text mode 
    But I get:
    Qt Code:
    1. Warning: Signals cannot be declared virtual
    To copy to clipboard, switch view to plain text mode 
    Thanks!
    Already asked this question in the past and got an anwer sorry!
    http://www.qtcentre.org/threads/1684...d-to-a-library
    Last edited by ucomesdag; 26th April 2010 at 18:46. Reason: updated contents

  2. #2
    Join Date
    Aug 2006
    Posts
    221
    Thanks
    3
    Thanked 29 Times in 19 Posts

    Default Re: Signal from a library

    Don't declare your signal virtual? This is at least what the errormessage tells me. Not 'don't declare a signal within a library'.
    Last edited by Kumosan; 26th April 2010 at 18:45. Reason: stupid grammar

  3. #3
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Signal from a library

    Hi,

    Have you tried to not declare the signal virutal as the compiler tells you?
    Òscar Llarch i Galán

  4. #4
    ucomesdag Guest

    Default Re: Signal from a library

    Quote Originally Posted by ^NyAw^ View Post
    Hi,

    Have you tried to not declare the signal virutal as the compiler tells you?
    Yes, but I get this at runtime:
    Qt Code:
    1. ** (<unknown>:13171): CRITICAL **: atk_object_set_name: assertion `name != NULL' failed
    To copy to clipboard, switch view to plain text mode 
    No signal is passed.

  5. #5
    ucomesdag Guest

    Default Re: Signal from a library

    Quote Originally Posted by ucomesdag View Post
    Qt Code:
    1. ** (<unknown>:13171): CRITICAL **: atk_object_set_name: assertion `name != NULL' failed
    To copy to clipboard, switch view to plain text mode 
    This had nothing to do with it. It's a GTK bug and should not affect my code.

    Got it working now, as I said I forgot I already asked this question and got it answered:
    http://www.qtcentre.org/threads/1684...d-to-a-library

Similar Threads

  1. Replies: 4
    Last Post: 18th December 2009, 18:55
  2. Replies: 1
    Last Post: 13th August 2009, 16:32
  3. signal mapping on pushbutton signal clicked
    By wagmare in forum Qt Programming
    Replies: 2
    Last Post: 17th March 2009, 07:54
  4. Signal-Signal Connections Between Threads
    By PhilippB in forum Qt Programming
    Replies: 2
    Last Post: 15th December 2008, 18:27
  5. Replies: 1
    Last Post: 8th November 2007, 17:11

Tags for this Thread

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.