How can I open my .html file in a browser?

You can use QDesktopServices [doc.qt.nokia.com] to open a URL with the appropriate application
for the system. So if you call

  1.     QDesktopServices::openUrl("http://qt.nokia.com/");

then a web browser as set by the system will be invoked to display the page. The actual web browser used depends on the system settings, so this could be Firefox, Internet Explorer, Opera or Safari etc.

If you need the page to be opened in e.g Firefox only, you can use QProcess [qt.nokia.com] to start the browser and provide the appropriate arguments to Firefox.

No comments

Write a comment

Sorry, you must be logged in to post a comment.