Qt6 QML Book/动态QML/动态QML

阅读 85

2022-02-01

Dynamic QML

动态QML

Until now, we have treated QML as a tool for constructing a static set of scenes and navigating between them. Depending on various states and logic rules, a living and dynamic user interface is constructed. By working with QML and JavaScript in a more dynamic manner, the flexibility and possibilities expand even further. Components can be loaded and instantiated at run-time, elements can be destroyed. Dynamically created user interfaces can be saved to disk and later restored.

到目前为止,我们一直将QML视为构建静态场景集并在它们之间导航的工具。根据不同的状态和逻辑规则,构建了一个生动、动态的用户界面。通过以更动态的方式使用QML和JavaScript,灵活性和可能性进一步扩大。组件可以在运行时加载和实例化,元素可以销毁。动态创建的用户界面可以保存到磁盘,然后恢复。

精彩评论(0)

0 0 举报