QML anchors to ApplicationWindow via id not work

后端 未结 2 1344
走了就别回头了
走了就别回头了 2021-01-18 03:26

I test a simple QML(Qt sdk version 5.3.2) program like this

import QtQuick 2.3
import QtQuick.Controls 1.2

ApplicationWindow {
    visible: true
    width:          


        
2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-18 03:50

    This looks like a bug, but it can be by design according following docs:

    For performance reasons, you can only anchor an item to its siblings and direct parent

    It's not really clear how we can specify direct parent when anchoring. QML translator may only accept parent to reference parent qml item.

提交回复
热议问题