Qt接口
代码语言:javascript复制QDesktopServices::openUrl(url)
/* QDesktopServices::openUrl(QUrl("http://www.example.com")); */
/* QDesktopServices::openUrl(QUrl::fromLocalFile("file:///C:/Users/Hello/Pictures/Qt.jpg")) */
Qml接口
代码语言:javascript复制Qt.openUrlExternally(url)
/* Qt.openUrlExternally("http://www.example.com") */
/* Qt.openUrlExternally("file:///C:/Users/Hello/Pictures/Qt.jpg") */