QML QQuickText: Detected anchors on an item that is managed by a layout. This is undefined behavior;

时间:2021-12-17 18:54:05

Qt5.9.1迁移到Qt5.12.1上,一堆:QML QQuickText: Detected anchors on an item that is managed by a layout. This is undefined behavior;

修改方法:

anchors.top: parent.top ===》》》》》Layout.alignment: Qt.AlignTop
anchors.topMargin: 5    ===》》》》》Layout.topMargin: 5