如何将此 qml.webengine 应用程序转换为 html 5

问题描述 投票:0回答:1

https://imgur.com/a/5ncaedR

这是一个简单的小应用程序,只需加载每个护目镜应用程序的网络视图 使用 qt.webengine 在 qml 中创建,但在过时的 Web 浏览器上出现错误 我暂时不会更新到 Qt 6,所以我想尝试将其转换为 html 不是 html 专家所以请耐心等待

我尝试使用 bootstrap 和 iframe 中的导航栏,但无法使用 iframe 保留登录信息...? 我看到 bootstrap 有嵌入功能,我怎样才能嵌入像 iframe 选项这样的外部网站?

<html>
<body style="text-align:left;">
 <!-- Load an icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="index.css">
<div class="view">
    <iframe src="#" name=viewPort width=85% height=100% scrolling=auto frameborder=0></iframe>
</div>
<!-- The sidebar -->
<div class="sidebar">
  <a href="https://mail.google.com/" target='viewPort'><i class="fa fa-solid fa-inbox"></i> Inbox</a>
  <a href="https://calendar.google.com/calendar/u/0/r" target="viewPort"><i class="fa fa-regular fa-calendar"></i> Calendar</a>
  <a href="https://contacts.google.com/" target='viewPort'><i class="fa fa-regular fa-address-card"></i> Contacts</a>
  <a href="https://voice.google.com/u/0/calls" target='viewPort'><i class="fa fa-solid fa-phone"></i> VOIP</a>
</div>
</body>
</html>

这是我到目前为止所拥有的https://jsfiddle.net/8k2L5oqx/ 这对于 html 来说是可能的吗? 任何指示表示赞赏

html qml bootstrap-5 qtwebengine
1个回答
0
投票

要将您的 QML WebEngine 应用程序转换为 HTML5,由于安全限制,请避免使用 Google 服务的 iframe;相反,将用户直接重定向到网站并考虑使用 Bootstrap 进行导航而不嵌入。

© www.soinside.com 2019 - 2024. All rights reserved.