Why we can't load large size file from file dialog and display data of file on textArea in qml?
Unsolved
QML and Qt Quick
-
I am trying to browse a file through FileDialog and display the content of file into TextArea of qml integrate with python. It works properly with small size file, but TextArea as well as app getting stuck when we browse a large size file. so, How to load large size file from FileDialog and update text of TextArea with data of file in qml?
FileDialog { id: fileDialog visible: visible onAccepted: { setOption(DontUseNativeDialogs, true) console.log("Accepted: " + fileUrl) fileTextArea.text = fileDialog.fileUrl fileIoObject.source = fileUrl fileIoObject.read() } } TextArea { id: jsonTextArea text: fileIoObject.jsonString } I expect the solution, how to load large size file from FileDialog and update text of TextArea with data of file in qml.
-
How big is the file?
Do you need the text to be editable or read only? If the latter, you can use Text element.
Does your file contain any rich text? If not, then set your component to parse and displaye in PlainText mode, it will save a lot of time.