【发布时间】:2016-09-30 07:45:16
【问题描述】:
在我的应用程序(QML、QtQuck 1.1、C++)中,我想重用屏幕中的一些项目。
一般有两种选择(如果有更多请告诉我)
1.Use a separate .qml file and put the basic block inside and import in new screen
2.Create a component and use loader to load it.
但我不明白该使用哪个选项。
这两个选项有什么区别。
或者
哪个会消耗更少的 CPU 负载?
谢谢!!
【问题讨论】:
-
这并不重要。两者的工作方式相同。使用加载器可能会多使用几百字节的内存。