How to Launch Web Browser

From Qt Wiki
Revision as of 09:49, 25 February 2015 by Maintenance script (talk | contribs)
Jump to navigation Jump to search


English | Deutsch | Български | Русский | 简体中文

How to Launch Web Browser

The class "QDesktopServices":http://doc.qt.io/qt-5.0/qtgui/qdesktopservices.html provides methods for accessing common desktop services such as opening a URL in the default web browser.

Please do not forget to include the following header files:

#include <QDesktopServices>
#include <QUrl>
QDesktopServices::openUrl(QUrl("https://qt.io/"));

References