本页内容

Qt Quick 变换类型

变换将应用于子级层次结构,同时也会对鼠标和触摸输入进行变换,因此事件处理程序中的坐标会按预期行为运行。

项属性

Item 包含许多便捷属性,涵盖了最常见的变换类型。

  • x 和y ;平移项。
  • scale; 对项目应用均匀的缩放因子。
  • rotation; 对项目应用逆时针旋转。
  • transformOrigin; 与缩放和旋转结合使用,以更改变换的原点。

变换列表

除了这些便捷类型外,还可以通过将Scale 、Rotation 和Translate 对象的列表赋值给Item 的transform 属性,来定义更全面的变换。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.