Qt 6.11 is out! See what's new in the release
blog
QSignalTransition setSignal
-
Hello,
I'm trying to add a signal which triggeres execution of the
QSignalTransitionviavoid QSignalTransition::setSignal(const QByteArray &signal)MyTransitionsis sub classingQSignalTransitionMy code:
QSharedPointer<MyTransition> transition = QSharedPointer<MyTransition>(new MyTransition()); // Set the sender and signal the QSignalTransition is listening for transition.data()->setSenderObject(this); transition.data()->setSignal(&MySender::echoStateChange);The line with
setSignal()throws following error:error: C2664: 'void QSignalTransition::setSignal(const QByteArray &)': cannot convert argument 1 from 'void (__cdecl MySender::* )(const MySender::State &)' to 'const QByteArray &'How can I properly set the signal?
I am aware, that passing the sender to the
QSignalTransition ctorworks, but this approach is not possible in my implementation -
R Redman has marked this topic as solved on