Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.10.0
-
None
-
Qt 5.10.0
Visual Studio 2015
Windows 10
Description
Hi
After I switched from Qt 5.9.0 to 5.10.0, all my properties declared with type "var" displayed garbage when they were initialized with a call to qsTr. More specifically, it displays a big number (like 98037088). Changing them to use "string" type solved the problem. Not using qsTr also solves the problem.
Minimal example:
import QtQuick 2.0 import QtQuick.Window 2.2 Window { width: 300 height: 300 visible: true property var str1: qsTr("some text") property string str2: qsTr("some text") property var str3: "some text" Column { Text {text: str1} Text {text: str2} Text {text: str3} } }
#include <QApplication> #include <QQmlApplicationEngine> int main(int argc, char** argv) { QApplication application(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl("qrc:/MainWindow.qml")); return application.exec(); }
Attachments
Issue Links
- duplicates
-
QTBUG-67839 Segfault when setting the text property of a TextArea initiliased with qsTr
- Closed