After my project began to grow quickly, it became difficult to track the connections between signals and slots. Are there any recommendations for convenient and fast tracking of communications? At the moment I have only one option, write down all the links on paper and constantly compare them during the development process.
1 answer
- What connections are possible to do by means of a designer so as not to clog the source code with them.
- Mass creation of links to make a separate method.
- In this method group the creation of links by source.
- Be sure to check that
connect
returnsTRUE
. - Use the C ++ 11 capabilities for
connect()
, then the signal and slot compatibility check will occur at the time of compilation.
Example for the 5th item:
connect(sender, &Sender::valueChanged, receiver, &Receiver::updateValue );
- Can be clearer in the examples, in particular about C ++ 11? I currently have everything in the file main.cpp - shaman888
- @ shaman888, added. - gbg
|