How to Launch Web Browser: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Sub-categorize) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Category: | {{LangSwitch}} | ||
[[Category:Snippets::Misc]] | |||
[[Category:HowTo]] | |||
The class {{DocLink|QDesktopServices}} 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: | |||
<code> | |||
#include <QDesktopServices> | |||
#include <QUrl> | |||
QDesktopServices::openUrl(QUrl("https://qt.io/")); | |||
</code> | |||
Latest revision as of 11:59, 28 November 2016
The class QDesktopServices 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/"));