7

How can i apply MVVM pattern in QtQuick applications?
Can anybody give me any sample (simple) code?

Thanks

S.M.Mousavi
  • 5,013
  • 7
  • 44
  • 59

1 Answers1

6

With a C++ ViewModel

I know someone has done the same thing with a QML ViewModel and bi-directional binding for the text element for example.

Bi-directional binding is done through the binding of the text property to the viewmodel property. Then, add a Binding node to bind the viewmodel property to the text property of the textinput.

GPPK
  • 6,546
  • 4
  • 32
  • 57
flex
  • 84
  • 1
  • 2