Image alignment does not appear to work?



  • I am trying to change the alignment properties of an image so that it moves about it's centrepoint, so for example, at position 0, 0 then the top left half of the image extends outside its parent.

    To do this, i assumed you would use the properties:
    @horizontalAlignment: Image.AlignHCenter
    verticalAlignment: Image.AlignVCenter@

    However doing this does not appear to do anything?
    If this property is not meant to do that, then what is it supposed to do?

    I cannot just anchor the image centre to its parent centre, as the image is needed to be moveable in response to user input.

    Also, it seems odd that only image has these horizontal and vertical alignment properties? For example there seems no way to do this to a rectangle or normal item?

    Hopefully someone could clear up the confusion.
    Thanks!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.