Qml:如何使文本或标签可选?

Tei*_*raz 7 qt qml qt5

假设我有文字成分:

Text {      
      text: "Hello"
      wrapMode: Text.WordWrap    
}
Run Code Online (Sandbox Code Playgroud)

如何使其可选?

eyl*_*esc 7

这是一个报告的错误:QTBUG-14077,解决方法是TextEdit在只读模式下使用:

TextEdit {
    text: "Hello"
    readOnly: true
    wrapMode: Text.WordWrap
    selectByMouse: true
}
Run Code Online (Sandbox Code Playgroud)