Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.3
-
None
Description
For the example below:
import QtQuick Item { id: _control implicitWidth: 640 implicitHeight: 480 property size leftIconSize: "150x50" Image { sourceSize: _control.leftIconSize } }
qmllint reports warnings (how to resolve them?):
Warning: MyComponent.qml:12:21: Cannot assign binding of type QSizeF to QSize [incompatible-type]
sourceSize: _control.leftIconSize
^^^^^^^^^^^^^^^^^^^^^
Warning: MyComponent.qml:12:42: Could not compile binding for sourceSize: cannot convert from QSizeF of (component in MyComponent.qml)::leftIconSize with type QSizeF to QSize of QSize [compiler]
qmltc generates incorrect code:
... this->m_leftIconSize = QStringLiteral("150x50"); ...
Attachments
Issue Links
- resulted in
-
QTBUG-118323 qmllint: produce warnings for string to valuetype conversions
- Open