Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Image alignment does not appear to work?
Qt 6.11 is out! See what's new in the release blog

Image alignment does not appear to work?

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 887 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    oneWonders
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved