【发布时间】:2012-01-17 12:23:33
【问题描述】:
我需要在模拟屏幕上显示一个字符串。为此,我应该从现有的 Filename.txt/Filename.csv 文件中读取文本。 text 参数已更新,如下面的代码所示。我需要从文本文件中访问字符串并在 MarqueeText 元素中使用它。 Accessed 字符串应在 MarqueeText 元素的 text 字段中使用。
MarqueeText {
id:scrolltext
width: 255
height: 48
anchors.verticalCenter: parent.horizontalCenter
text: //i need to access the string in text file to be displayed
}
请帮我解决这个问题。谢谢。
【问题讨论】: