113 Star 947 Fork 337

PyQt5/PyQt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.github
Demo
Donate
PyQtGraph
QAxWidget
QCalendarWidget
QCheckBox
QColumnView
QComboBox
QDateTime
QDateTimeEdit
QDial
QDockWidget
QDoubleSpinBox
QFileSystemModel
QFlowLayout
QFont
QFontComboBox
QFormLayout
QFrame
QGraphicsDropShadowEffect
QGraphicsView
QGridLayout
QGroupBox
QHBoxLayout
QLCDNumber
QLabel
QLineEdit
QListView
QListWidget
QMdiArea
QMenu
QMessageBox
QMetaObject
QOpenGLWidget
QPainter
QPlainTextEdit
QProcess
QProgressBar
QPropertyAnimation
QProxyStyle
QPushButton
QRadioButton
QScrollArea
QScrollBar
QSerialPort
QSlider
QSpacerItem
QSpinBox
QSplashScreen
QSplitter
QStackedLayout
QStackedWidget
QSystemTrayIcon
QTabWidget
QTableView
QTableWidget
QTextBrowser
ScreenShot
DynamicRes.py
README.en.md
README.md
QTextEdit
QThread
QTimeEdit
QToolBox
QToolButton
QTreeView
QTreeWidget
QVBoxLayout
QWebChannel
QWebEngineView
QWebView
QWidget
QtChart
QtDataVisualization
QtQuick
QtRemoteObjects
QtWinExtras
Test
.gitattributes
.gitignore
LICENSE
README.md
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

QTextBrowser

1、动态加载图片

运行 DynamicRes.py

动态加载资源有多种方式,这里主要介绍 addResourceloadResource 函数

1、通过 self.textBrowser.document().addResource(QTextDocument.ImageResource, QUrl('dynamic:/images/weixin.png'), img) 向文档中注册新的资源索引,类似QRC 2、通过重载 loadResource 函数可以监听到所有的资源加载,然后动态返回内容

DynamicRes

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/PyQt5/PyQt.git
git@gitee.com:PyQt5/PyQt.git
PyQt5
PyQt
PyQt
master

搜索帮助

371d5123 14472233 46e8bd33 14472233