Closed ibnz closed 7 years ago
If we assign different propertysets to the property widget we must disconnect all old propertyset's signals.
widget.setPropertySet(propertyset1);
...
widget.setPropertySet(propertyset2);
...
delete propertyset1;
according to your code widget will be reset when we delete propertyset1, because widget didn't disconnect previous propertyset signals.
OK. catch it.
Воскресенье, 9 апреля 2017, 11:40 +03:00 от Z Z ibntemp@mail.ru:
This is not necessary. "All signals to and from the object are automatically disconnected, and any pending posted events for the object are removed from the event queue." in the destructor of QObject. You only need to reset the invalid pointer in the child class
Воскресенье, 9 апреля 2017, 9:00 +03:00 от Alex Zhondin < notifications@github.com >:
@lexxmark requested changes on this pull request. please, add disconnect from old propertySet's destroyed signal here - https://github.com/lexxmark/QtnProperty/blob/master/PropertyWidget/PropertyView.cpp#L115 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or mute the thread .
This is not necessary. "All signals to and from the object are automatically disconnected, and any pending posted events for the object are removed from the event queue." in the destructor of QObject. You only need to reset the invalid pointer in the derived class