Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.3.0 Beta2
-
6efb9946cf43a369e71fa182da97d7510d86579f
Description
The following QML results in error "qrc:/msg/main.qml:23:13: Unable to assign [undefined] to QString" if added with qt_add_qml_module:
import QtQuick import QtQuick.Controls import msg Window { id: win width: 640 height: 480 visible: true title: qsTr('Hello world') readonly property int count: 50 Column { anchors.fill: parent Label { text: qsTr('%1 message(s)', 'dashboard').arg(win.count) height: 50 } Label { //This does not work text: qsTr('%n message(s)', 'dashboard', win.count) height: 50 } Label { text: qsTr('%n message(s)', 'dashboard', 50) height: 50 } Label { text: qsTr('%n message(s)', 'dashboard', Message.count) height: 50 } } }
If the qml file above is added manually via qrc (qt_add_executable) and loaded the problem does not occur. Can be tested with "-w" command line arg in the test project.
Steps to reproduce the problem:
- run the attached project => error occurs
- run the attached project with "-w" => no error
The same problem cannot be reproduced with Qt 6.2.3 at all.
Attachments
Issue Links
- duplicates
-
QTBUG-101285 error: use of undeclared identifier 'r9_1'; did you mean 'r2_1'?
-
- Closed
-