Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to center items in positioners



  • I want to center items inside positioners. At the same time I want to use animations also while adding and removing them.

    If I use Row type, I have to center row itself to achieve what I want. But adding/removing items change width of row and this disturbs my animation. Example:

    Row {
      id: row
      anchors.horizontalCenter: parent.horizontalCenter
      height: 240
      // Dynamically created items here
      move: Transition {} // Transitions here
    }
    

    If I want to use RowLayout, there is an attached property called Layout.alignment which I want. But there is no transitions in these layouts.

    So, should I implement it myself or is there any way to make it happen.


Log in to reply