benlau / quickflux

A Flux implementation for QML
Apache License 2.0
327 stars 74 forks source link

C++ based example #15

Open jeremybastin1207 opened 7 years ago

jeremybastin1207 commented 7 years ago

Hello Mister Benlau, We would like to implement your framework in one of our new project. We would be very interested in an example using C++ instead of QML. What do we want exactly in our case ? Having stores and actions management in C++.

We would very pleased and grateful if you could have some time for it.

Have a nice day !

benlau commented 7 years ago

Hello,

So far I only have an example in listening to the actions from QML in C++. Quick Flux is a bit overkill for a pure C++ application. It should need a new framework.

However, there has a problem in making a Flux implementation for in C++. That is the data type to be passed to Dispatcher. C++ is strong type language but Dispatcher allow any kind of data to be passed to the dispatch() function. Ofcoz, it could use QVariant type just like what Quick Flux did. But I think C++ developer do not really like this approach.

Therefore, I don't have a solid answer about how to make it for C++ yet.

jeremybastin1207 commented 7 years ago

Thanks for your answer. I will keep you informed if I find a solution for this issue.

cerkiewny commented 5 years ago

@benlau could you also mention what is the preferred way of interacting with stores/actions from c++ code? Unless I missunderstand something I should be changing properties in the store singleton, right?