PyQt/README.md

267 lines
11 KiB
Markdown
Raw Normal View History

2018-05-06 02:25:16 +08:00
# 各种各样的PyQt测试和例子
2018-10-31 09:56:45 +08:00
[![Blog](https://img.shields.io/badge/blog-pyqt5-green.svg)](https://pyqt5.com)
2019-08-21 11:26:14 +08:00
[![codebeat badge](https://codebeat.co/badges/d23d0dc8-aef3-43d2-96aa-e3215b2c9861)](https://codebeat.co/projects/github-com-pyqt5-pyqt-master)
2018-10-31 09:56:45 +08:00
2019-11-08 01:02:15 +08:00
https://pyqt.site 论坛是专门针对PyQt5学习和提升开设的网站分享大家平时学习中记录的笔记和例子以及对遇到的问题进行收集整理。
2018-09-25 23:20:03 +08:00
2019-05-08 21:27:16 +08:00
[![GitHub watchers](https://img.shields.io/github/watchers/PyQt5/PyQt.svg?style=social&label=Watch)](https://github.com/PyQt5/PyQt)
[![GitHub stars](https://img.shields.io/github/stars/PyQt5/PyQt.svg?style=social)](https://github.com/PyQt5/PyQt)
[![GitHub forks](https://img.shields.io/github/forks/PyQt5/PyQt.svg?style=social)](https://github.com/PyQt5/PyQt/fork)
2019-05-08 21:20:08 +08:00
如果您觉得这里的东西对您有帮助,别忘了帮忙点一颗:star:小星星:star:
2019-07-02 15:33:13 +08:00
## 微信博客小程序
<img src="Donate/wxblog.jpg" height="250" width="250">
2019-02-10 22:29:28 +08:00
[客户端下载](https://github.com/PyQt5/PyQtClient/releases)
2019-04-28 11:53:52 +08:00
[自定义控件](https://github.com/PyQt5/CustomWidgets)
2018-12-26 23:04:56 +08:00
## 目录
2019-03-12 00:08:16 +08:00
- Layouts
- [QVBoxLayout](QVBoxLayout)
- [QHBoxLayout](QHBoxLayout)
- [QGridLayout](QGridLayout)
- [腾讯视频热播列表](QGridLayout/HotPlaylist.py)
- [QFormLayout](QFormLayout)
- [QFlowLayout](QFlowLayout)
- [腾讯视频热播列表](QFlowLayout/HotPlaylist.py)
- Spacers
- [Horizontal Spacer](QSpacerItem)
- [Vertical Spacer](QSpacerItem)
- Buttons
- [QPushButton](QPushButton)
- [普通样式](QPushButton/NormalStyle.py)
- [按钮底部线条进度](QPushButton/BottomLineProgress.py)
- [按钮文字旋转进度](QPushButton/FontRotate.py)
2019-07-02 15:22:54 +08:00
- [按钮常用信号](QPushButton/SignalsExample.py)
2019-03-12 00:08:16 +08:00
- [QToolButton](QToolButton)
- [QRadioButton](QRadioButton)
- [QCheckBox](QCheckBox)
- Item Views
- [QListView](QListView)
- [显示自定义Widget](QListView/CustomWidgetItem.py)
- [显示自定义Widget并排序](QListView/CustomWidgetSortItem.py)
- [自定义角色排序](QListView/SortItemByRole.py)
- [QTreeView](QTreeView)
- [QTableView](QTableView)
- [表格内容复制](QTableView/CopyContent.py)
- [QColumnView](QColumnView)
- [QUndoView](QUndoView)
- Item Widgets
- [QListWidget](QListWidget)
- [删除自定义Item](QListWidget/DeleteCustomItem.py)
- [自定义可拖拽Item](QListWidget/DragDrop.py)
- [腾讯视频热播列表](QListWidget/HotPlaylist.py)
2019-05-27 17:53:43 +08:00
- [仿折叠控件效果](QListWidget/FoldWidget.py)
2019-07-03 15:00:16 +08:00
- [列表常用信号](QListWidget/SignalsExample.py)
2019-04-13 12:51:20 +08:00
- [在item中添加图标](Test/partner_625781186/13.combo_listwidget)
2019-03-12 00:08:16 +08:00
- [QTreeWidget](QTreeWidget)
- [通过json数据生成树形结构](QTreeWidget/ParsingJson.py)
2019-04-13 12:51:20 +08:00
- [拖拽显示为图片](Test/partner_625781186/12.1拖拽显示为图片)
2019-04-22 21:28:42 +08:00
- [点击父节点全选/取消全选子节点](QTreeWidget/testTreeWidget.py)
2019-11-08 13:07:18 +08:00
- [禁止父节点](QTreeWidget/ParentNodeForbid.py)
2019-03-12 00:08:16 +08:00
- [QTableWidget](QTableWidget)
- [Sqlalchemy动态拼接字段查询显示表格](QTableWidget/SqlQuery.py)
2019-04-16 12:56:40 +08:00
- [TableWidget嵌入部件](QTableWidget/TableWidget.py)
2019-03-12 00:08:16 +08:00
- Containers
- [QGroupBox](QGroupBox)
- [QScrollArea](QScrollArea)
- [仿QQ设置面板](QScrollArea/QQSettingPanel.py)
- [QToolBox](QToolBox)
- [QTabWidget](QTabWidget)
- [QStackedWidget](QStackedWidget)
- [左侧选项卡](QStackedWidget/LeftTabStacked.py)
- [QFrame](QFrame)
- [QWidget](QWidget)
- [样式表测试](QWidget/WidgetStyle.py)
- [QMdiArea](QMdiArea)
- [QDockWidget](QDockWidget)
- Input Widgets
- [QComboBox](QComboBox)
- [下拉数据关联](QComboBox/CityLinkage.py)
- [QFontComboBox](QFontComboBox)
- [QLineEdit](QLineEdit)
- [QTextEdit](QTextEdit)
- [文本查找高亮](QTextEdit/HighlightText.py)
- [QPlainTextEdit](QPlainTextEdit)
- [QSpinBox](QSpinBox)
- [QDoubleSpinBox](QDoubleSpinBox)
- [QTimeEdit](QTimeEdit)
- [QDateTime](QDateTime)
- [QDial](QDial)
- [QScrollBar](QScrollBar)
- [滚动条样式美化](QScrollBar/StyleScrollBar.py)
- [QSlider](QSlider)
- [滑动条点击定位](QSlider/ClickJumpSlider.py)
- [双层圆环样式](QSlider/QssQSlider.py)
- Display Widgets
- [QLabel](QLabel)
- [图片加载显示](QLabel/ShowImage.py)
- [图片旋转](QLabel/ImageRotate.py)
- [仿网页图片错位显示](QLabel/ImageSlipped.py)
- [显示.9格式图片(气泡)](QLabel/NinePatch.py)
- [圆形图片](QLabel/CircleImage.py)
- [QTextBrowser](QTextBrowser)
2020-06-03 11:28:35 +08:00
- [动态加载图片](QTextBrowser/DynamicRes.py)
2019-03-12 00:08:16 +08:00
- [QGraphicsView](QGraphicsView)
- [绘制世界地图](QGraphicsView/WorldMap.py)
- [添加QWidget](QGraphicsView/AddQWidget.py)
- [QCalendarWidget](QCalendarWidget)
- [QSS美化日历样式](QCalendarWidget/CalendarQssStyle.py)
- [QLCDNumber](QLCDNumber)
- [QProgressBar](QProgressBar)
- [常规样式美化](QProgressBar/SimpleStyle.py)
- [圆圈进度条](QProgressBar/RoundProgressBar.py)
- [百分比进度条](QProgressBar/PercentProgressBar.py)
- [Metro进度条](QProgressBar/MetroCircleProgress.py)
- [水波纹进度条](QProgressBar/WaterProgressBar.py)
2020-06-11 19:23:47 +08:00
- [QSplashScreen](QSplashScreen)
- [启动画面动画](QSplashScreen/GifSplashScreen.py)
2019-03-12 00:08:16 +08:00
- [QOpenGLWidget](QOpenGLWidget)
- [QWebView](QWebView)
- [梦幻树](QWebView/DreamTree.py)
- [获取Cookie](QWebView/GetCookie.py)
2019-05-22 10:46:02 +08:00
- [和Js交互操作](QWebView/JsSignals.py)
2019-07-08 15:43:01 +08:00
- [网页整体截图](QWebView/ScreenShotPage.py)
2019-09-18 13:32:22 +08:00
- [播放Flash](QWebView/PlayFlash.py)
2019-09-24 16:17:05 +08:00
- [拦截请求](QWebView/BlockRequest.py)
2019-03-12 00:08:16 +08:00
- [QWebEngineView](QWebEngineView)
- [获取Cookie](QWebEngineView/GetCookie.py)
2019-04-27 16:47:05 +08:00
- [和Js交互操作](QWebEngineView/JsSignals.py)
2019-07-09 16:50:40 +08:00
- [网页整体截图](QWebEngineView/ScreenShotPage.py)
2019-08-23 19:41:54 +08:00
- [同网站不同用户](QWebEngineView/SiteDiffUser.py)
2019-09-24 16:05:33 +08:00
- [拦截请求](QWebEngineView/BlockRequest.py)
2020-02-18 12:39:33 +08:00
- [拦截请求内容](QWebEngineView/BlockRequestData.py)
2019-04-13 12:51:20 +08:00
- [浏览器下载文件](Test/partner_625781186/6.QWebEngineView下载文件)
- [打印网页](Test/partner_625781186/17_打印预览qwebengineview)
2019-03-12 00:08:16 +08:00
- [QThread](QThread)
- [继承QThread](QThread/InheritQThread.py)
- [moveToThread](QThread/moveToThread.py)
- [线程挂起恢复](QThread/SuspendThread.py)
- [线程休眠唤醒](QThread/WakeupThread.py)
- [QtQuick](QtQuick)
- [Flat样式](QtQuick/FlatStyle.py)
2019-09-18 23:20:18 +08:00
- [QML与Python交互](QtQuick/Signals.py)
2019-03-12 00:08:16 +08:00
2019-10-04 10:18:34 +08:00
- [QtChart](QtChart)
- [折线图](QtChart/LineChart.py)
- [折线堆叠图](QtChart/LineStack.py)
- [柱状堆叠图](QtChart/BarStack.py)
- [LineChart自定义xy轴](QtChart/CustomXYaxis.py)
- [ToolTip提示](QtChart/ToolTip.py)
- [DynamicSpline动态曲线图](QtChart/DynamicSpline.py)
- [区域图表](QtChart/AreaChart.py)
- [柱状图表](QtChart/BarChart.py)
- [饼状图表](QtChart/PieChart.py)
- [样条图表](QtChart/SplineChart.py)
- [百分比柱状图表](QtChart/PercentBarChart.py)
- [横向柱状图表](QtChart/HorizontalBarChart.py)
- [横向百分比柱状图表](QtChart/HorizontalPercentBarChart.py)
- [散点图表](QtChart/ScatterChart.py)
- [图表主题动画](QtChart/ChartThemes.py)
2019-10-04 15:16:30 +08:00
- [QtDataVisualization](QtDataVisualization)
- [柱状图3D](QtDataVisualization/BarsVisualization.py)
2019-10-04 23:39:16 +08:00
- [太阳磁场线](QtDataVisualization/MagneticOfSun.py)
- [余弦波3D](QtDataVisualization/ScatterVisualization.py)
2019-10-04 15:16:30 +08:00
2019-05-08 16:34:07 +08:00
- [PyQtGraph](PyQtGraph)
- [鼠标获取X轴坐标](PyQtGraph/mouseFlow.py)
2019-05-21 17:56:02 +08:00
- [禁止右键点击功能、鼠标滚轮,添加滚动条等功能](PyQtGraph/graph1.py)
- [工具类](PyQtGraph/tools.py)
- [滚动区相关](PyQtGraph/testGraphAnalysis.py)
2019-03-12 00:08:16 +08:00
- [Animation](QPropertyAnimation)
- [窗口淡入淡出](QPropertyAnimation/FadeInOut.py)
- [右键菜单动画](QPropertyAnimation/MenuAnimation.py)
- [点阵特效](QPropertyAnimation/RlatticeEffect.py)
- [页面切换/图片轮播动画](QPropertyAnimation/PageSwitching.py)
2019-05-08 18:19:11 +08:00
- [窗口抖动](QPropertyAnimation/ShakeWindow.py)
2019-05-15 22:19:29 +08:00
- [窗口翻转动画仿QQ](QPropertyAnimation/FlipWidgetAnimation.py)
2019-04-13 12:51:20 +08:00
- [折叠动画](Test/partner_625781186/2.折叠控件)
2019-08-07 16:26:48 +08:00
- [RemoteObjects](QtRemoteObjects)
2019-08-07 17:30:03 +08:00
- [简单界面数据同步](QtRemoteObjects/SyncUi)
2019-08-07 16:26:48 +08:00
- [modelview](QtRemoteObjects/modelview)
- [simpleswitch](QtRemoteObjects/simpleswitch)
2019-03-12 00:08:16 +08:00
2019-08-21 18:25:55 +08:00
- [QPainter](QPainter)
2020-07-02 13:08:27 +08:00
- [QtWinExtras](QtWinExtras)
- [任务栏进度条](QtWinExtras/TaskbarProgress)
2019-03-12 00:08:16 +08:00
- Others
- [QFont](QFont)
- [加载自定义字体](QFont/AwesomeFont.py)
- [QMenu](QMenu)
- [菜单设置多选并且不关闭](QMenu/MultiSelect.py)
2019-04-13 12:51:20 +08:00
- [悬停菜单](Test/partner_625781186/5.hoverMenu)
2019-03-12 00:08:16 +08:00
- [QAxWidget](QAxWidget)
- [显示Word、Excel、PDF文件](QAxWidget/ViewOffice.py)
- [QSplitter](QSplitter)
- [分割窗口的分割条重绘](QSplitter/RewriteHandle.py)
- [QSerialPort](QSerialPort)
- [串口调试小助手](QSerialPort/SerialDebugAssistant.py)
- [QProxyStyle](QProxyStyle)
- [Tab文字方向](QProxyStyle/TabTextDirection.py)
- [QMessageBox](QMessageBox)
- [消息对话框倒计时关闭](QMessageBox/CountDownClose.py)
- [自定义图标等](QMessageBox/CustomColorIcon.py)
2019-07-10 14:10:51 +08:00
- [消息框按钮文字汉化](QMessageBox/ChineseText.py)
2019-03-12 00:08:16 +08:00
- [QFileSystemModel](QFileSystemModel)
- [自定义图标](QFileSystemModel/CustomIcon.py)
- [QGraphicsDropShadowEffect](QGraphicsDropShadowEffect)
- [边框阴影动画](QGraphicsDropShadowEffect/ShadowEffect.py)
2019-07-26 13:06:02 +08:00
- [QSystemTrayIcon](QSystemTrayIcon)
- [最小化到系统托盘](QSystemTrayIcon/MinimizeToTray.py)
2019-03-12 00:08:16 +08:00
- [Demo](Demo)
- [重启窗口Widget](Demo/RestartWindow.py)
- [简单的窗口贴边隐藏](Demo/WeltHideWindow.py)
- [嵌入外部窗口](Demo/EmbedWindow.py)
- [简单跟随其它窗口](Demo/FollowWindow.py)
2019-04-23 11:57:00 +08:00
- [调整窗口显示边框](Demo/ShowFrameWhenDrag.py)
2019-03-12 00:08:16 +08:00
- [简单探测窗口和放大截图](Demo/ProbeWindow.py)
2019-04-23 10:50:19 +08:00
- [无边框圆角对话框](Demo/FramelessDialog.py)
2019-03-12 00:08:16 +08:00
- [无边框自定义标题栏窗口](Demo/FramelessWindow.py)
- [右下角弹出框](Demo/WindowNotify.py)
- [程序重启](Demo/AutoRestart.py)
- [自定义属性](Demo/CustomProperties.py)
- [调用截图DLL](Demo/ScreenShotDll.py)
- [单实例应用](Demo/SingleApplication.py)
- [简单的右下角气泡提示](Demo/BubbleTips.py)
- [右侧消息通知栏](Demo/Notification.py)
- [验证码控件](Demo/VerificationCode.py)
- [人脸特征点](Demo/FacePoints.py)
- [使用Threading](Demo/QtThreading.py)
2019-03-20 23:39:38 +08:00
- [背景连线动画](Demo/CircleLine.py)
2019-04-26 18:06:27 +08:00
- [判断信号是否连接](Demo/IsSignalConnected.py)
2019-05-22 18:27:42 +08:00
- [调用虚拟键盘](Demo/CallVirtualKeyboard.py)
2020-03-13 00:30:54 +08:00
- [动态忙碌光标](Demo/GifCursor.py)
2018-10-28 00:24:47 +08:00
2018-05-06 02:25:16 +08:00
# QQ群
2018-11-02 17:57:50 +08:00
2019-03-15 23:51:32 +08:00
[PyQt 学习](https://jq.qq.com/?_wv=1027&k=5QVVEdF)
2018-05-06 02:25:16 +08:00
2018-11-02 23:31:00 +08:00
# [Donate-打赏](Donate)
2019-09-07 12:05:09 +08:00
感谢所有捐助者的鼓励,[这里](https://github.com/PyQt5/thanks) 列出了捐助者名单(由于一些收款渠道无法知道对方是谁,如有遗漏请联系我修改)
2019-01-10 15:06:08 +08:00
<a href="javascript:;" alt="微信"><img src="Donate/weixin.png" height="350" width="350"></a>or<a href="javascript:;" alt="支付宝"><img src="Donate/zhifubao.png" height="350" width="350"></a>
2018-05-06 02:25:16 +08:00
2019-04-28 11:53:52 +08:00
[一些Qt写的三方APP](https://github.com/PyQt5/3rd-Apps)