Important: Please read the Qt Code of Conduct -

SpriteSequence disable smooth scaling

  • I am making a game and the artwork has a pixelated style.

    I would like to use a SpriteSequence but cannot find a way to turn smooth scaling off, I want blocky images. Using the property Smooth:false doesnt do anything. I wish to avoid scaling all of my images x2 in photoshop as this wastes space.

    I am able to achieve the desired look using AnimatedSprite but then the state machine functionality is missing.

    My platform is Windows 7 64bit and my Qt version is 5.5 mingw

    SpriteSequence {
        id: ss
        x: 200
        y: 200
        width: 32
        height: 32
        scale: 2
        interpolate: false
        goalSprite: ""
        smooth: false // valid but has no effect
        Sprite {
            name: "left"
            source: "unit.png"
            frameCount: 3
            frameWidth: 32
            frameHeight: 32
            frameRate: 20
            frameX: 0
            frameY: 0
            smooth: false // cannot be used here
        // additional sprite states removed
    AnimatedSprite {
        id: left
        x: 400
        y: 200
        source: "unit.png"
        running: true
        frameDuration: 20
        scale: 2
        smooth: false // works great
        frameX: 0
        frameY: 0

  • I'd like to bump this topic, it's been over 5 years and you'd think small sprites would be better respected and not blurry with the qt engine (as ya know, sprites came from the pixel era) , I've tried everything under the sun to get sprites that aren't blurry and it seems you have to basically use an AnimatedImage or your own sprite engine to make do.

    I would have modified the sprites item or made my own copy but I couldn't find a copy of its source