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:-
Code:
QMetaObject::connectSlotsByName: No matching
signal for on_pushButtonViewExistingProductRecords_clicked
()
how to get rid of this.
Re: No matching signal for on_pushButtonViewExistingProductRecords_clicked()
Re: No matching signal for on_pushButtonViewExistingProductRecords_clicked()
i did as follows :-
build -> clean project then
build -> rebuild project
but has no effect
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.
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.
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.
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