Results 1 to 4 of 4

Thread: Incompatible sender/receiver arguments

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2009
    Posts
    65
    Thanks
    10
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Incompatible sender/receiver arguments

    I have 2 classes A and B

    class A has a signal emitMessage(QString)
    class B has a slot showMessage(QString, int)

    is there a way to connect these two with constant int value, something like

    connect(A, SIGNAL(emitCritical(QString, 5)), B, SLOT(showMessage(QString, int)));

    or
    connect(A, SIGNAL(emitCritical(QString)), B, SLOT(showMessage(QString, 5)));

    I know that if signal had more arguments, they will be ignored in slot, but is it possible to have default values for slot arguments
    Last edited by davidovv; 6th May 2011 at 10:07.

Similar Threads

  1. QCoreApplication::postEvent: Unexpected null receiver
    By mortoray in forum Qt Programming
    Replies: 3
    Last Post: 14th November 2010, 22:14
  2. Incompatible MSVCRT.dll
    By ahmdsd_ostora in forum Installation and Deployment
    Replies: 10
    Last Post: 22nd August 2010, 09:02
  3. Receiver
    By Salazaar in forum Newbie
    Replies: 1
    Last Post: 5th May 2007, 19:26
  4. QCoreApplication::postEvent: Unexpected null receiver
    By merlvingian in forum Qt Programming
    Replies: 6
    Last Post: 13th March 2007, 20:25
  5. postEvent() to a non-existing receiver
    By Artschi in forum Qt Programming
    Replies: 7
    Last Post: 1st June 2006, 14:44

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.