Results 1 to 4 of 4

Thread: signal is not emmiting from the pushbutton

  1. #1
    Join Date
    Nov 2007
    Posts
    42
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question signal is not emmiting from the pushbutton

    hi,
    i had set a "contextmenu policy to Qt::CustomContextMenu" for QPushButton

    but it is not emmiting the signal "customContextMenuRequested(const QPoint &pos)" even though this signal is inherited from QWidget

    and when i running the application , it displaying on the terminal as


    Object::connect: No such signal QPushButton::customContextMenuRequested(QPoint&pos )
    Object::connect: (sender name: 'spelling')
    Object::connect: (receiver name: 'window')

    so what would be the problem???????????

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: signal is not emmiting from the pushbutton


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

    sudheer (28th April 2008)

  4. #3
    Join Date
    Nov 2007
    Posts
    42
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: signal is not emmiting from the pushbutton

    thankq very much

    but may i know why we wouldn't put the parameter names (or values) inside SIGNAL() and SLOT() macros ???

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: signal is not emmiting from the pushbutton

    Because signal and slot signatures are checked characted by character (they are C strings) and signal signatures don't contain parameter names, thus the comparison fails if you pass parameter name or value. Signatures are subject to some normalization, but it doesn't contain discarding parameter names or values. You might treat it as a precaution, so that you don't expect the arguments passed to the connection to be meaningful.

Similar Threads

  1. Possible signal mapper problem
    By MarkoSan in forum Qt Programming
    Replies: 13
    Last Post: 25th January 2008, 14:11
  2. Replies: 2
    Last Post: 17th May 2006, 22:01
  3. Replies: 10
    Last Post: 27th January 2006, 19:12

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.