Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.3, 6.0, 6.1
-
-
86039f61b32095cb2e341402438c96178baa0158
Description
A qml file imports a javascript file like this:
import 'qrc:/example.js' as E
In that same file, a inline component is defined and instantiated, which uses a function of that js file:
component MyText : Text { text: E.func() } MyText {}
The expectation is that the binding to the text property is (correctly) evaluated when the inline component is instantiated. Instead, an error is thrown:
TypeError: Cannot call method 'func' of null
I tested on 5.15.3 on Linux only, but I expect the same behaviour on all platforms.
Please find the attached minimal example to produce this error.
Attachments
Issue Links
- duplicates
-
QTBUG-95095 Inline QML component can't use named import of JavaScript module from enclosing scope
- Closed