Solved Externaly open local HTML file
-
Hello,
I would like to open a local HTML file on the computer web browser.
But I don't know how to achieve this. Can somebody help me ?
I tried this :Qt.openUrlExternally("help.html")
but it does not work : here is the error message I have :
ShellExecute 'qrc:/help.html' failed
-
@DavidM29 it seems you need to fully qualify the page you want to open.
Qt.openUrlExternally("http://some-server-name-or-ip/help.html")
or
Qt.openUrlExternally("file:///path/to/help.html")
-
-
@Pablo-J-Rogina @kenchan
Thank you for those answer !
This line worked :Qt.openUrlExternally("file:///path/to/help.html")
I also tried @kenchan's solution but it did not work Qt can't find QUrl so maybe problem with a missing import. But anyway find a good solution.