QML 对本地文件的读写 QML 里似乎没有提供直接访问本地文件的模块,但是我们能够自己扩展 QML,给它加上访问本地文件的能力. Qt 官方文档对 QML 是这样介绍的: It defines and implements the language and engine infrastructure, and provides an API to enable application developers to extend the QML language with custom types
1.打开本地文件或者网页链接 // 打开系统本地文件 const {shell} = require('electron'); // Open a local file in the default app var path1 = "d:\ProjectsSpace\ElectronProjects\ElectronTest2\app\html\config\record.txt"; shell.openItem(path1); //打开网页链接 // Open a URL in th