[Interest] Having two QDeclerativeContexts , setSource of one through the other?

kai.koehne at nokia.com kai.koehne at nokia.com
Mon May 7 10:33:32 CEST 2012


> -----Original Message-----
> From: interest-bounces+kai.koehne=nokia.com at qt-project.org
> [mailto:interest-bounces+kai.koehne=nokia.com at qt-project.org] On Behalf
> Of ext Sivan Greenberg
> Sent: Friday, May 04, 2012 7:04 PM
> To: Interests Qt
> Subject: [Interest] Having two QDeclerativeContexts , setSource of one
> through the other?
> 
> Hi All,
> 
>  My client app needs to have two sets of UI interaction - one is used to load
> QML files that describe complete UIs and "run" them, for testing purposes,
> the other is the control UI of the client app (if anyone was wondering, this is
> for the UX feedback system I'm working in my non existent spare time, AKA
> crowdquick). Is it possible to have one QDeclerativeContext .setSource of
> another one? Alternatively, is there a way to create another context within a
> containing one? Such that the parent one could .setSource  of the child? Or
> otherwise, create the main program with QWidgets that control the
> QDeclerativeContext from C++ ?

Hi Sivan,

If I got your description right you're talking about two different UI's, where one sets parameters to the other. I'd try to keep the two things decoupled from the QML perspective, and rather have a clean interface (in C++) that separates it. Whether you write your controller then in QML or QWidgets is up to you, but independent from the interaction with the rest... It's possible to interlink QDeclarativeContexts via e.g. the context chain, but I don't see how that helps you ...
 
Regards

Kai

> What's the recommended approach ?
> 
> Thanks!
> --
> -Sivan
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list