http://doc.qt.io/archives/qt-4.7/anchor-layout.html告诉父级的 anchors.right
是“一条不可见的 anchor 线”,并指向 Item
的 anchors.right : AnchorLine
属性,
但是 parent.right
和 parent.anchors.right
似乎是不同的东西(通常你不能锚定到后者,而锚定到前者的作品正如预期的那样)。
有人提示我查看文档吗?
最佳答案
我没有找到任何文档,但调查来源表明 parent.right
是一个常量,而 parent.anchors.right
是您可以设置关联的地方.
所以它们不应该是相同的。您可以将 parent.right
视为 const int RIGHT=1;
并将 parent.anchors.right
视为 int rightAnchor;
关于qt - QML 中的parent.right(例如)到底是什么?它与parent.anchors.right 有什么不同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11142000/