A slot can take less arguments than provided by the signal, HOW? - Qt
问题 I have a signal which its declaration is: void removed(int sPI, int sWID , int ePI, int eWID); I want to connect it to a slots twice, first needs sPI and sWID arguments and other slot needs ePI and eWID. The slot declaration is: void disconnect(int i, int wID = 0); ( I want when removed() emits, disconnect(sPI, sWID) and also disconnect(ePI, eWID) ) Please help me in writing QObject::connect() statement. Thanks. 回答1: For the first, "disconnect(sPI, sWID)", just do: connect(x, SIGNAL(removed