Results 1 to 6 of 6

Thread: QObject::connect: No such signal

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: QObject::connect: No such signal

    Hello Marcel,

    thanks.. But, I actually did connect with unsigned int as seen in the test codes below:

    Qt Code:
    1. #include <qapplication.h>
    2. #include <qlayout.h>
    3. #include "BinaryButtonWg.h"
    4.  
    5. int main( int argc, char *argv[] )
    6. {
    7. QApplication app( argc, argv );
    8. QWidget* widget = new QWidget();
    9. widget->setFixedSize(QSize(500,300));
    10. QHBoxLayout* hlayout = new QHBoxLayout(widget);
    11. BinaryButtonWg maskbb(QSize(200, 40), 12, widget);
    12. BinaryButtonWg valuebb(QSize(200, 40), 12, widget);
    13. hlayout->addWidget( &maskbb);
    14. hlayout->addWidget( &valuebb);
    15. app.setMainWidget( widget );
    16. QObject::connect(&maskbb, SIGNAL( bbChanged(unsigned int newValue) ),
    17. &valuebb, SLOT( enableBits(unsigned int bits) ));
    18.  
    19. widget->show();
    20. return app.exec();
    21. }
    To copy to clipboard, switch view to plain text mode 

    But, still has the same complaint:

    QObject::connect: No such signal BinaryButtonWg::bbChanged(unsigned int newValue)
    QObject::connect: (sender name: 'unnamed')
    QObject::connect: (receiver name: 'unnamed')
    Thanks...

    Casey
    Last edited by jpn; 19th February 2008 at 06:47.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QObject::connect: No such signal

    Do not put parameter names to connect-statement:
    Qt Code:
    1. QObject::connect(&maskbb, SIGNAL( bbChanged(unsigned int) ),
    2. &valuebb, SLOT( enableBits(unsigned int) ));
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  3. #3

    Default Re: QObject::connect: No such signal

    Hello J-P,

    thankyou !! that is the error...

    Casey

  4. #4

    Default Re: QObject::connect: No such signal

    If dumpObjectInfo() shows
    SIGNALS OUT
    <None>
    SIGNALS IN
    QHButtonGroup::unnamed

    will that have confirmed there is no out signal from the object? Are there alternatives of checking for SIGNALs other than dumpObjectInfo()?

    Thanks..

    Casey

Similar Threads

  1. Possible signal mapper problem
    By MarkoSan in forum Qt Programming
    Replies: 13
    Last Post: 25th January 2008, 13:11
  2. Replies: 6
    Last Post: 21st September 2007, 13:51
  3. Replies: 2
    Last Post: 17th May 2006, 21:01
  4. no such signal QListBox::currentChanged()
    By jopie bakker in forum Newbie
    Replies: 2
    Last Post: 2nd March 2006, 15:17

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.