I am new to Qt. When I read the documentation, I came across this configuration:
connect( Object1, Signal1, Object2, slot1 ) connect( Object1, Signal1, Object2, slot2 )
What could be a precedent for this?
It looks strange to me, coming from the Erlang / Python background. This should be due to inheritance twists in C ++, and I think it is possible.
This applies to cases where you have something like one button that changes two parts of another. This may seem silly, but it would be equivalent to calling a function of the second slot from the first slot.
, / , . , . , 2 .
1 slot2 .
connect( Object1, Signal1, Object2, slot1 ); connect( Object1, Signal1, Object2, slot2 ); connect( Object3, Signal1, Object2, slot1 ); connect( Object4, Signal1, Object2, slot2 );
MVC... , "" , , ...
PieChart :
connect( MySourceModel, SIGNAL(newDataAreThere()), PieChartView, SLOT(notifyNewDataReceived()));
... :
connect( MySourceModel, SIGNAL(newDataAreThere()), AnotherView, SLOT(notifyNewDataReceived()));
/ , , ... ...
, ;)