Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 4.1.0-rc1
-
Ubuntu 16.04 LTS 64 bit
-
eeb0358d65620f6de39649fbe8b43ee44b5fff8c
Description
- Open this QML code in Creator:
import QtQuick 2.6 import QtQuick.Window 2.2 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") MouseArea { anchors.fill: parent onClicked: { var someString; someString = "abcd"; txt.text = someString } } Text { id: txt text: qsTr("Hello World") anchors.centerIn: parent } }
I have it inside a Qt Quick UI project.
- Place a breakpoint in line 15:
txt.text = someString
- Run this in the debugger.
- Click the app's window.
Execution stops at the breakpoint. - In Locals and Expressions view, double-click the value of someString.
The quotation marks disappear so only the real content of the string is shown. - Type some other characters and press Enter.
The old value is displayed again. - Repeat step 6 but enclose the string in quotation marks.
Now the value will be updated. - Continue execution.
The app uses the value you entered.
It is confusing that the quotation marks disappear when editing but you then have to add them yourself. Either the quotation marks should not disappear or there should be no need to add them when entering a value.