Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
QtQuickアプリケーションでMVVMパターンを適用するにはどうすればよいですか? 誰かが私にサンプル(単純な)コードを教えてもらえますか?
ありがとう
C++ViewModelを使用
たとえば、誰かがQMLViewModelとテキスト要素の双方向バインディングで同じことをしたことを知っています。
双方向のバインドは、textプロパティをviewmodelプロパティにバインドすることで行われます。次に、Bindingノードを追加して、viewmodelプロパティをtextinputのtextプロパティにバインドします。