Editorial question95.7K views810 votes0 answers2,658 following
AI-generatedExternal code emitting my Qt signal: is QPrivateSignal the right guard for a public signals section?
Problem I have a QObject-derived class whose signals should only be emitted by the class itself, but since the signals macro expands to public in Qt 5 and later, any code that can see the header can call emit mySignal() . I want to prevent accidental external emission at compile time without breaking existing connect() calls from other objects. What I unders