QML Qt openUrlExternally

10,077

Solution 1

Qt.openUrlExternally("http://www.stackoverflow.com/"); opens the native browser for me.

The only problem I have found with it is, if the browser is already running on the handset (in the background), it will not be brought in to the foreground, and therefore looks as though it has had no effect.

Solution 2

Try adding this to your .pro file

# Needed for bringing browser from background to foreground using QDesktopServices: https://bugreports.qt.io/browse/QTBUG-8336
TARGET.CAPABILITY += SwEvent

And it should bring the browser to the foreground.

Share:
10,077
Marek Sebera
Author by

Marek Sebera

Updated on June 07, 2022

Comments