- Qt 6.7
- Qt Qml
- QML Lint Warning and Errors
- Missing property
- Qt 6.7.3 Reference Documentation

# Missing property

This warning category is spelled c{[missing-property]} by qmllint.

## Can't assign to non-existent default property

### What happened?

You assigned an object to a non-existing default property.

### Why is this bad?

The QML engine can't assign this object at runtime.

### Example

     import QtQuick

     Item {
         component MyType: QtObject { property Item myItem; }

         MyType {
             Item {}
         }
     }

To fix this warning, specify the property you want to bind to or, if you are the author of the type, mark a property as default:

     import QtQuick

     Item {
         component MyType: QtObject { property Item myItem; }

         MyType {
             myItem: Item {}
         }

         component AlternativeMyType: QtObject { default property Item myItem; }

         AlternativeMyType {
             Item {} // bound to myItem via default property
         }
     }

## Property does not exist

### What happened?

You assigned an expression to a non-existing property.

### Why is this bad?

The QML engine can't assign this expression at runtime.

### Example

     import QtQuick

     Item {
         property int myInt
         myItn: 42
     }

To fix this warning, remove the binding or correct a possible typo:

     import QtQuick

     Item {
         property int myInt
         myInt: 42
     }

## Member not found on type

### What happened?

You accessed a member in a field member expression that can't be found by QML tooling.

A field member expression is an expression of the form `someId.someProperty`.

### Why is this bad?

The QML tooling can't find this member, and the QML engine probably can't either.

### Example

     import QtQuick

     Item {
         id: self
         property int myInt
         property int myInt2: 1 + self.myItn
     }

To fix this warning, remove the binding or correct a possible typo:

     import QtQuick

     Item {
         id: self
         property int myInt
         property int myInt2: 1 + self.myInt
     }