How to Launch Web Browser: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
(Sub-categorize)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''English''' [[How to Launch Web Browser Bulgarian|Български]] [[How to Launch Web Browser Russian|Русский]] [[How to Launch Web Browser SimplifiedChinese|简体中文]]
{{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.


=How to Launch Web Browser=
Please do not forget to include the following header files:
<code>
#include <QDesktopServices>
#include <QUrl>


The class [http://doc.qt.io/qt-5.0/qtgui/qdesktopservices.html QDesktopServices] ''[qt.io]'' provides methods for accessing common desktop services such as opening a <span class="caps">URL</span> in the default web browser.
QDesktopServices::openUrl(QUrl("https://qt.io/"));
 
</code>
Please do not forget to include the following header files:<br />
 
==References==
 
[http://wiki.forum.nokia.com/index.php/How_to_launch_other_applications_in_Qt How to launch other applications in Qt] ''[wiki.forum.nokia.com]''
 
===Categories:===
 
* [[:Category:HowTo|HowTo]]
* [[:Category:snippets|snippets]]

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:

#include <QDesktopServices>
#include <QUrl>

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