I’m using a sprite sheet generated by the texture packer, here is it’s json source:
<code class="language-qml">{"frames": { "brick-hd.png": { "frame": {"x":2,"y":2,"w":44,"h":44}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":44,"h":44}, "sourceSize": {"w":44,"h":44} }}, "meta": { "app": "http://www.codeandweb.com/texturepacker ", "version": "1.0", "image": "textures.png", "format": "RGBA8888", "size": {"w":64,"h":64}, "scale": "1", "smartupdate": "$TexturePacker:SmartUpdate:36c3e6127ca7935d11da3ac8c93cdd04:32c4e4a0b3f879bac602e5838702b49c:cf827d152df04949dfee256cd0c8efd8$" } }
Then i setup an entity which holds a single sprite:
<code class="language-qml">SingleSpriteFromFile { id: sprite source: "brick-hd.png" filename: "../../graphics/textures.json" anchors.fill: brick }
When i draw this sprite, it gets scaled down to 22px instead of 44px, which is an unpleasant behavior. If i use rectangles instead of sprites, everythings works like expected.