Difference between revisions of "How to Launch Web Browser"

From Qt Wiki
Jump to: navigation, search
(Cleanup)
(Sub-categorize)
 
Line 1: Line 1:
 
{{LangSwitch}}
 
{{LangSwitch}}
[[Category:snippets]]
+
[[Category:Snippets::Misc]]
 
[[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 {{DocLink|QDesktopServices}} provides methods for accessing common desktop services such as opening a URL in the default web browser.

Latest revision as of 11:59, 28 November 2016

En Ar Bg De El Es Fa Fi Fr Hi Hu It Ja Kn Ko Ms Nl Pl Pt Ru Sq Th Tr Uk Zh

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:

  1. include <QDesktopServices>
  2. include <QUrl>

QDesktopServices::openUrl(QUrl("https://qt.io/"));