I tried to do this:
connect(this, SIGNAL(signalClicked(int&)), classA, SLOT(doWork(int&)));
But I get a message in the title. So I studied the internet, and I came up with this solution, which does not work either:
qRegisterMetaType<int&>("Type"); connect(this, SIGNAL(signalClicked(Type)), classA, SLOT(doWork(Type)));
(Error: there is no corresponding function to call 'qRegisterMetaType (const char [5]))
Any solutions? Thank you for your help.
source share