How to Launch Web Browser: Difference between revisions
Jump to navigation
Jump to search
AutoSpider (talk | contribs) (Convert ExpressionEngine links) |
(Cleanup) |
||
Line 1: | Line 1: | ||
{{ | {{LangSwitch}} | ||
[[Category:snippets]] | [[Category:snippets]] | ||
[[Category:HowTo]] | [[Category:HowTo]] | ||
The class {{DocLink|QDesktopServices}} provides methods for accessing common desktop services such as opening a URL in the default web browser. | |||
The class | |||
Please do not forget to include the following header files: | Please do not forget to include the following header files: | ||
Line 14: | Line 8: | ||
#include <QDesktopServices> | #include <QDesktopServices> | ||
#include <QUrl> | #include <QUrl> | ||
QDesktopServices::openUrl(QUrl("https://qt.io/")); | QDesktopServices::openUrl(QUrl("https://qt.io/")); | ||
</code> | </code> | ||
Revision as of 19:02, 28 June 2015
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/"));