Coming from Java and .NET, I have become used to declaratively binding domain objects to UI controls. It seems like there is not really an established idomatic way of bidirectionally connection (non-Qt) domain objects and Qt-objects. Implementing the signal-slot mechanism in the domain objects would obviously pollute the core domain model and introduce unwanted dependencies.
I know that database binding is available, but this is not my use case.
What's the practice for large Qt projects in this regard?
Signals and slots are the way to go if you want to use loose coupling in Qt. Of course you need Qt objects for this. And yes, you will "pollute" your core model that way. If you want to avoid this kind of "pollution" (which is accepted in most Qt projects) you need to use standard C++ patterns.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With