@dobey You are right. I was testing QDesktopServices::openUrl when you posted this.
My C++/SDL app launches the morph web browser. Here's how to make a C++/SDL app launch the web browser in Ubuntu Touch:
Step 1:
You need to add these to your CMakeLists.txt:
(You may have more than one CMakeList.txt file and some of the code lines below will go in different CMakeList.txt files.)
(Add these lines below after "project(...)" and "cmake_minimum_required(..)")
find_package(Qt5Core)
find_package(Qt5Qml)
find_package(Qt5Quick)
(Add this line below after "execute_process(... OUTPUT_VARIABLE ARCH_TRIPLET ...)" )
set(QT_IMPORTS_DIR "lib/${ARCH_TRIPLET}")
(Add this line below after "add_executable(... main.cpp ...)" )
qt5_use_modules(YOURPROJECTNAMEHERE Gui Qml Quick QuickControls2)
Replace YOURPROJECTNAMEHERE with your project name.
Step 2:
Put these headers near the top of main.h/main.cpp:
#include <QGuiApplication>
#include <QDesktopServices>
#include <QUrl>
Put this at the top of main():
QGuiApplication *app = new QGuiApplication(argc, (char**)argv);
Near the end of main(), replace "return 0;" with this:
return app->exec();
Step 3:
And now for the magic... Somewhere in your C++ code, make your link:
if ( event.type == SDL_FINGERDOWN )
{
QDesktopServices::openUrl(QUrl("https://forums.ubports.com"));
}
If you have any comments, suggestions or ways to improve this code, let me know. Thank you all for your help.