Model-View-Delegate
模型-视图-委托
As soon as the amount of data goes beyond the trivial, it is no longer feasible to keep a copy of the data with the presentation. This means that the presentation layer, what is seen by the user, needs to be separated by the data layer, the actual contents. In Qt Quick, data is separated from the presentation through a so called model-view separation. Qt Quick provides a set of premade views in which each data element is the visualization by a delegate. To utilize the system, one must understand these classes and know how to create appropriate delegates to get the right look and feel.
一旦数据量太过琐碎,就不适合直接保留数据副本。这意味着表示层,即用户看到的内容,需要要离出数据层,即实际数据内容。在Qt Quick中,通过所谓的模型-视图分离将数据与表示分离。Qt Quick提供了一组预制视图,其中每个数据元素都是由委托进行可视化的。要使用该系统,必须了解这些类,并知道如何创建适当的委托以获得正确的外观。