Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.8.1
-
None
-
d25fc4c63fa4512aa1cfc5ce3877e4d8632b3fec
Description
The following example will result in a "ReferenceError: Can't find variable: reel" error message.
Both "highlight" and "delegate" reference components. Why can't the highlight component reference the local "reel" id?
main.qml
import QtQuick 1.1 Column { width: 300 height: 300 Reel { id: reelInstance // setting some local id here } }
Reel.qml
import QtQuick 1.1 ListView { id: reel width: 100 height: 100 property string someProperty: "Bla!" highlight: Text { // results in "ReferenceError: Can't find variable: reel" text: ">>> " + reel.someProperty } delegate: Text { // interestingly: this works as expected text: "M " + reel.someProperty + " - " + modelData } model: 10 }