Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想用特定的 url 调用浏览器,比如 youtube 应用程序。我尝试使用 Navigator Invoke,但是它显示了我的应用程序。我不想显示我的应用程序,只是在用户单击应用程序图标时显示浏览器,有人可以帮我吗..
将其放入 main.cpp 中的 main()
QDesktopServices::openUrl(QUrl("http://example.com",QUrl::TolerantMode));
但是您必须删除(注释)以下行:
new ApplicationUI(&app); return Application::exec();
否则无论如何都会打开应用程序