In questa pagina

Avviso rapido: Tipo di proprietà associata

Questa categoria di avviso viene indicata da qmllint con il nome " [Quick.attached-property-type] ".

La proprietà associata deve essere associata a un oggetto derivato da un tipo specifico

Cosa è successo?

Hai istanziato una proprietà associata in un oggetto di tipo errato.

Perché è un errore?

La proprietà associata non funzionerà.

Esempio

import QtQuick

Item {
    QtObject {
        LayoutMirroring.enabled: true
    }
}

Per risolvere questo avviso, modifica il tipo contenente in modo che erediti dal tipo indicato nel messaggio di avviso:

import QtQuick

Item {
    Item {
        LayoutMirroring.enabled: true
    }
}

© 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.