问题标签 [qwebengineview]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - Python PyQT - Web Browser | Bookmarks
This is a repost of my previous post which I deleted. In the first post I asked if someone knows a way of creating bookmarks with PyQT5, however, originally, I did not post what issues I am having now, with my way. I have 3 toolbars, in my web browser.
- For additional buttons as - exit, minimize, maximize and etc.
- For navigation in the web.
- Bookmarks all are created with the instance of QToolBar().
Bookmarks toolbar code
After the tool bars are created the buttons are added, as there is a lot of code there I will show just the final result as a screenshot and the last few lines of code in init function.
The last few lines of code:
Everything is fine with the Web Browser itself, as everything is working except the bookmarks. The line of code 'bookmarks_load()' load the bookmarks from a .txt file. As for now in the .txt document the bookmark is youtube.com (does not matter which link is used). The bookmarks functioncs:
Add a website to a bookmark.txt
Load bookmarks from the document file.
Create the bookmarks 'button', when pressed open a new tab with that website.
Now this is the part which I start having issues. If I remove the - triggered.connect line and I do not add any functionality to that 'button' everything launches and works, without any errors. It stores and can load the bookmarks. However, when that line is added, it crashes and the button is not created(The app does not exit as there is an except statement which catches the error - which pyqt does not show what error it is.). This is the add_new_tab() function:
Originally I open tabs by 'double clicking' on the tab bar with this function:
As you can see on the trigger - I do pass the link as QUrl and I do add a test label. The problem I have it somehow does not want to work and I can not find why, because Python PyQT5 does not show an error, it just closes with the return code.
Screenshots as explanation:
Link not added to a bookmarks.txt
Link added to bookmarks.txt
Pickle does dump the link in .txt
The "except" statement is run, while the triggered.connect line is not commented out.
The app continues to run, but the loaded bookmarks buttons are not there.
qt - Qt5.11.1中,`QWebEngineView`可以调用ActiveX插件吗?
在Qt5.11.1
,可以QWebEngineView
调用ActiveX插件吗?
如果是这样,我该如何称呼它?
我正在使用浏览器并想使用 QWebEngineView 调用 ActiveX 插件。我在网上搜索并没有找到任何信息。
javascript - 从 pyqt QWebEngineView 启动 javascript 函数
我打算从 pyqt QWebEngine 执行一个 javascript 函数。我遵循了一个使用地图的示例,并且在按下 Qt 应用程序按钮时检索了地图绑定,并编写了一个小示例。
html:
Python:
不过,我收到以下错误:
我错过了什么?
javascript - QML WebEngineView 和 DOM 元素更新
我正在尝试使用 javascript 使用更新的输入凭据打开 Netflix url。输入似乎在 HTML 表单中更新,但是当我触发登录按钮时,输入字段为空。非常感谢任何输入
python - 如何在 Python QT Designer 中插入 Web 浏览器
我在 QT Designer 5 中创建了一个简单的用户界面,并希望包含一个显示网页的小部件。我使用以下代码将 ui 文件与 python 一起使用:
似乎没有小部件可以用来在 QT Designer 中插入 Web 浏览器小部件,因此我正在寻找一个小部件来通过使用类或其他东西并将小部件添加到已经在 Designer 中创建的界面来实现这一点。
python - 在 QWebEngineView 中获取 sslerrors 信号
我正在开发一个用户必须先登录的应用程序。我正在使用 QWebEngineView 来显示登录页面。但是在其中一台机器中,该页面没有显示。我想知道是否有任何 SSL 错误。如何获取 sslerrors 信号并将其连接到插槽。下面的示例代码
注意:在 Qt4 中这很容易,因为我们可以将 page().networkAccessManager().sslerrors 信号连接到插槽,而在 Qt5 中,由于请求不是通过 NetworkAccessManager 发出的,因此调试起来有点困难。
qt - 使用 QWebEngineView 显示 QCH 文件的内容
我们在项目中使用 Qt-Help,但我对 Qt-assistant 中 Qt-Help 的格式真的不满意。与我的 Firefox 中 HTML 文件的格式相比,它看起来真的很难看。
原因之一可能是 Qt 助手在其呈现中忽略了 javascript。
因此,我尝试实现一个非常简单的测试运行程序,它应该显示 QHC 文件的内容。
不幸的是,QWebEngineView
找不到QUrl
QHC 文件的链接。
如何配置QWebEngineView
,以便它在 QHC 文件中查找资源?还必须找到 HTML 帮助文件中的所有图像和其他外部资源。
也许这门课QWebEngineUrlSchemeHandler
可能会有所帮助。