signals - Qt Unique connection -
i wondering either there possibility in qt, co create signal-slot connection, automatically break other connections particular slot/ signal? appreciate help. qt doesn't provide such functionality directly. moreover, it's impossible iterate signal-slot connections, can't implement in general. what should doing keeping track of connections initiate yourself, , removing them appropriate. for example: enum class connectiondisposal { dispose, keep }; class uniqueconnector { q_disable_copy(uniqueconnector) qmetaobject::connection m_conn; connectiondisposal m_cd; public: explicit uniqueconnector(connectiondisposal cd = connectiondisposal::dispose) : m_cd(cd) {} ~uniqueconnector() { if (m_cd == connectiondisposal::dispose) disconnect(); } template <typename t, typename r> qmetaobject::connection connect(const qobject * tx, t txf, const qobject * rx, r rxf, qt::connectiont...