C语言

Qt Quick Ultralite image_cache 示例

import QmlProject 1.3

Project {
        mainFile: "image_cache.qml"
        MCU.Config {
                maxResourceCacheSize: 1105920
        }

        InterfaceFiles {
                files: [
                "ImageModel.h"
                ]
        }

        ImageFiles {
                files: [
                "images/basse-terre-guadeloupe.jpg",
                "images/grand-canyon-arizona.jpg",
                "images/grand-canyon-national-park.jpg",
                "images/Jokulsarlon-glacier-lagoon-iceland.jpg",
                "images/reine-lofoten-islands.jpg",
                "images/sequoia-national-park.jpg",
                "images/sogn-og-fjordane.jpg",
                "images/yosemite-national-park.jpg",
                ]
                MCU.resourceCachePolicy: "OnDemand"
                MCU.resourceImagePixelFormat: "RGB565"
        }
}