PyQt5基础学习-QWebEngineView(构建网页显示器) 1.QWebEngineView().load(Qurl(加载对应的网址))
2022/2/5 23:43:14
本文主要是介绍PyQt5基础学习-QWebEngineView(构建网页显示器) 1.QWebEngineView().load(Qurl(加载对应的网址)),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
构造网页显示器, 在界面上显示对应的网址内容
WebEngineView.py
""" 用Web浏览器控件(QWebEngineView)显示网页 PyQt5和Web的交互技术 同时使用Python和Web开发程序, 混合开发 python + JavaScript + HTML5 + CSS QWebEngineView() """ from PyQt5.QtWidgets import * from PyQt5.QtCore import QTimer, QDateTime from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWebEngineWidgets import * import sys class WebEngineView(QMainWindow): def __init__(self): super(WebEngineView, self).__init__() self.setWindowTitle("打开外部网页例子") self.setGeometry(5, 30, 1355, 730) self.browser = QWebEngineView() self.browser.load(QUrl("https://geekori.com")) self.setCentralWidget(self.browser) if __name__ == "__main__": app = QApplication(sys.argv) main = WebEngineView() main.show() sys.exit(app.exec_())
这篇关于PyQt5基础学习-QWebEngineView(构建网页显示器) 1.QWebEngineView().load(Qurl(加载对应的网址))的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-19永别了,微服务架构!
- 2024-05-15鸿蒙生态设备数量超8亿台
- 2024-05-13TiDB + ES:转转业财系统亿级数据存储优化实践
- 2024-05-09“2024鸿蒙零基础快速实战-仿抖音App开发(ArkTS版)”实战课程已上线
- 2024-05-09聊聊如何通过arthas-tunnel-server来远程管理所有需要arthas监控的应用
- 2024-05-09log4j2这么配就对了
- 2024-05-09nginx修改Content-Type
- 2024-05-09Redis多数据源,看这篇就够了
- 2024-05-09Google Chrome驱动程序 124.0.6367.62(正式版本)去哪下载?
- 2024-05-09有没有大佬知道这种数据应该怎么抓取呀?