Results 1 to 7 of 7

Thread: No matching signal for on_pushButtonViewExistingProductRecords_clicked()

  1. #1
    Join Date
    Jun 2014
    Posts
    47
    Thanks
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default No matching signal for on_pushButtonViewExistingProductRecords_clicked()

    i've centos 7.5 and qt5.7 in VM. I am builfing a small project. I've added a button "pushButtonViewExistingProductRecords" and used slot by name for other buttons, after some time i removed that button (pushButtonViewExistingProductRecords ). after that compiler shows follwoing error, but project runs successfully. error is:-
    Qt Code:
    1. QMetaObject::connectSlotsByName: No matching signal for on_pushButtonViewExistingProductRecords_clicked()
    To copy to clipboard, switch view to plain text mode 
    how to get rid of this.

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: No matching signal for on_pushButtonViewExistingProductRecords_clicked()

    Run full rebuild.

  3. #3
    Join Date
    Jun 2014
    Posts
    47
    Thanks
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: No matching signal for on_pushButtonViewExistingProductRecords_clicked()

    i did as follows :-

    build -> clean project then
    build -> rebuild project

    but has no effect

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,229
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: No matching signal for on_pushButtonViewExistingProductRecords_clicked()

    You might have to either run qmake manually or edit the XML in the .ui file to remove the connection (which will be listed at the bottom of the file). Make a backup copy of the ui file first because if you mess up the editing, you will probably also break the UI itself.

    This is one reason why I (and many other Qt developers, I think) don't like using automatically generated connections based on name. I don't like things that happen in code I don't see without a lot of poking around.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  5. #5
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: No matching signal for on_pushButtonViewExistingProductRecords_clicked()

    > after some time i removed that button

    But you forgot to remove the function - it is still there but the autoconnect feature can no longer find the associated button.

  6. The following user says thank you to ChristianEhrlicher for this useful post:

    rahulvishwakarma (9th April 2020)

  7. #6
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,229
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: No matching signal for on_pushButtonViewExistingProductRecords_clicked()

    Yes, that's probably correct - the function declaration is hidden in the MOC-generated code, and the function implementation still exists in the cpp file. Another reason why I dislike auto-generated slots.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  8. The following user says thank you to d_stranz for this useful post:

    rahulvishwakarma (9th April 2020)

  9. #7
    Join Date
    Jun 2014
    Posts
    47
    Thanks
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: No matching signal for on_pushButtonViewExistingProductRecords_clicked()

    finally I get your point, and I deleted both declaration and implementation in header and source files. thanks a lot
    Last edited by rahulvishwakarma; 9th April 2020 at 10:25.

Similar Threads

  1. Replies: 1
    Last Post: 21st February 2016, 17:01
  2. Replies: 3
    Last Post: 26th November 2014, 17:52
  3. Replies: 7
    Last Post: 28th November 2013, 06:03
  4. Bug in 'yy' matching?
    By claytondaley in forum Qt Programming
    Replies: 1
    Last Post: 21st December 2012, 20:18
  5. Replies: 2
    Last Post: 8th November 2007, 21:23

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.