You have several problems in your code, namely:
1) You do not assign an id your component object.
2) You are trying to inherit Component with a property that is useless in this simple code.
3) You are not using the item property correctly for the Loader element.
4) You refer to the name of the property, not to the id component. This again returns to unnecessary inheritance.
Based on the official documentation, you should do something like this:
import QtQuick 2.0 Rectangle { width: 100 height: 100 color: "black" Component { id: comp1 Rectangle { id: abc property int timeout: 5000 width: 10; height: 10; color: "red" } } Loader { id: loader sourceComponent: comp1 } Component.onCompleted: console.log( "timeout: " + loader.item.timeout ) }
source share