PDA

View Full Version : emiting signals from const member functions !?



sunil.thaha
25th March 2006, 05:41
Is there a way to emit signals form const member functions;
I am getting errors :


In member function `float PayrollCreator::hraPercent() const':
BusinessLogic/PayrollCreator.cpp:516: error: passing `const PayrollCreator' as `this' argument of `void PayrollCreator::log(const QString&)' discards qualifiers

wysota
25th March 2006, 09:02
Make the slot const too.

Matt Smith
25th March 2006, 11:29
Is there a way to emit signals form const member functions;
I am getting errors :

There is a section on emitting signals from a const method in Practical Qt. It's on page 236.