This commit is contained in:
Irony 2018-12-28 10:48:24 +08:00
parent 8dd83f5fe8
commit c2d4262249
26 changed files with 1252 additions and 1255 deletions

View file

@ -8,6 +8,7 @@ encoding//QTableView/CopyContent/CopyContent.py=utf-8
encoding//QTableView/CopyContent/__main__.py=utf-8 encoding//QTableView/CopyContent/__main__.py=utf-8
encoding//QTableWidget/SqlQuery/SqlQuery.py=utf-8 encoding//QTableWidget/SqlQuery/SqlQuery.py=utf-8
encoding//QTableWidget/SqlQuery/__main__.py=utf-8 encoding//QTableWidget/SqlQuery/__main__.py=utf-8
encoding//QTreeWidget/ParsingJson.py=utf-8
encoding//\u5176\u5B83/C\u548CC++\u6269\u5C55/py\u8F6Cpyd/pydmod.py=utf-8 encoding//\u5176\u5B83/C\u548CC++\u6269\u5C55/py\u8F6Cpyd/pydmod.py=utf-8
encoding//\u5176\u5B83/QRC\u8D44\u6E90\u6587\u4EF6\u4F7F\u7528/qrctest1.py=utf-8 encoding//\u5176\u5B83/QRC\u8D44\u6E90\u6587\u4EF6\u4F7F\u7528/qrctest1.py=utf-8
encoding//\u5176\u5B83/QRC\u8D44\u6E90\u6587\u4EF6\u4F7F\u7528/qrctest2.py=utf-8 encoding//\u5176\u5B83/QRC\u8D44\u6E90\u6587\u4EF6\u4F7F\u7528/qrctest2.py=utf-8
@ -55,14 +56,6 @@ encoding//\u56FE\u7247/\u663E\u793A.9\u683C\u5F0F\u56FE\u7247/\u7EAFpython\u7248
encoding//\u56FE\u7247/\u663E\u793A.9\u683C\u5F0F\u56FE\u7247/\u7EAFpython\u7248\u672C1/testNinePatch.py=utf-8 encoding//\u56FE\u7247/\u663E\u793A.9\u683C\u5F0F\u56FE\u7247/\u7EAFpython\u7248\u672C1/testNinePatch.py=utf-8
encoding//\u56FE\u7247/\u663E\u793A.9\u683C\u5F0F\u56FE\u7247/\u7EAFpython\u7248\u672C2/QtNinePatch.py=utf-8 encoding//\u56FE\u7247/\u663E\u793A.9\u683C\u5F0F\u56FE\u7247/\u7EAFpython\u7248\u672C2/QtNinePatch.py=utf-8
encoding//\u56FE\u7247/\u663E\u793A.9\u683C\u5F0F\u56FE\u7247/\u7EAFpython\u7248\u672C2/testQtNinePatch.py=utf-8 encoding//\u56FE\u7247/\u663E\u793A.9\u683C\u5F0F\u56FE\u7247/\u7EAFpython\u7248\u672C2/testQtNinePatch.py=utf-8
encoding//\u56FE\u8868/PyQtChart/ChartView/ChartView.py=utf-8
encoding//\u56FE\u8868/PyQtChart/ChartView/ChatWidget.py=utf-8
encoding//\u56FE\u8868/PyQtChart/charts/bar/BarStack.py=utf-8
encoding//\u56FE\u8868/PyQtChart/charts/line/LineStack.py=utf-8
encoding//\u56FE\u8868/PyQtChart/demo/LineChart.py=utf-8
encoding//\u56FE\u8868/PyQtChart/demo/LineChart\u81EA\u5B9A\u4E49xy\u8F74.py=utf-8
encoding//\u56FE\u8868/PyQtChart/demo/ToolTip.py=utf-8
encoding//\u56FE\u8868/PyQtChart/demo/ToolTip2.py=utf-8
encoding//\u591A\u7EBF\u7A0B/moveToThread.py=utf-8 encoding//\u591A\u7EBF\u7A0B/moveToThread.py=utf-8
encoding//\u591A\u7EBF\u7A0B/\u7EBF\u7A0B\u4F11\u7720\u5524\u9192.py=utf-8 encoding//\u591A\u7EBF\u7A0B/\u7EBF\u7A0B\u4F11\u7720\u5524\u9192.py=utf-8
encoding//\u591A\u7EBF\u7A0B/\u7EBF\u7A0B\u6302\u8D77\u6062\u590D.py=utf-8 encoding//\u591A\u7EBF\u7A0B/\u7EBF\u7A0B\u6302\u8D77\u6062\u590D.py=utf-8
@ -70,7 +63,6 @@ encoding//\u591A\u7EBF\u7A0B/\u7EE7\u627FQThread.py=utf-8
encoding//\u591A\u9875\u9762/QScrollArea/\u4EFFQQ\u8BBE\u7F6E\u9762\u677F/SettingUi.py=utf-8 encoding//\u591A\u9875\u9762/QScrollArea/\u4EFFQQ\u8BBE\u7F6E\u9762\u677F/SettingUi.py=utf-8
encoding//\u591A\u9875\u9762/QScrollArea/\u4EFFQQ\u8BBE\u7F6E\u9762\u677F/\u4EFFQQ\u8BBE\u7F6E\u9762\u677F.py=utf-8 encoding//\u591A\u9875\u9762/QScrollArea/\u4EFFQQ\u8BBE\u7F6E\u9762\u677F/\u4EFFQQ\u8BBE\u7F6E\u9762\u677F.py=utf-8
encoding//\u591A\u9875\u9762/QStackedWidget/\u5DE6\u4FA7\u9009\u9879\u5361/\u5DE6\u4FA7\u9009\u9879\u5361.py=utf-8 encoding//\u591A\u9875\u9762/QStackedWidget/\u5DE6\u4FA7\u9009\u9879\u5361/\u5DE6\u4FA7\u9009\u9879\u5361.py=utf-8
encoding//\u6811\u7ED3\u6784/QTreeWidget/Json\u751F\u6210QTreeWidget/Json\u751F\u6210\u6811\u5F62\u7ED3\u6784.py=utf-8
encoding//\u6D4F\u89C8\u5668/QWebView/\u68A6\u5E7B\u6811/\u68A6\u5E7B\u6811.py=utf-8 encoding//\u6D4F\u89C8\u5668/QWebView/\u68A6\u5E7B\u6811/\u68A6\u5E7B\u6811.py=utf-8
encoding//\u6ED1\u52A8\u6761/\u6ED1\u52A8\u6761\u70B9\u51FB\u5B9A\u4F4D.py=utf-8 encoding//\u6ED1\u52A8\u6761/\u6ED1\u52A8\u6761\u70B9\u51FB\u5B9A\u4F4D.py=utf-8
encoding//\u7A97\u53E3/\u5206\u5272\u7A97\u53E3\u7684\u5206\u5272\u6761\u91CD\u5199.py=utf-8 encoding//\u7A97\u53E3/\u5206\u5272\u7A97\u53E3\u7684\u5206\u5272\u6761\u91CD\u5199.py=utf-8

View file

@ -6,7 +6,7 @@ Created on 2017年12月19日
@author: Irony."[讽刺] @author: Irony."[讽刺]
@site: http://alyl.vip, http://orzorz.vip, http://coding.net/u/892768447, http://github.com/892768447 @site: http://alyl.vip, http://orzorz.vip, http://coding.net/u/892768447, http://github.com/892768447
@email: 892768447@qq.com @email: 892768447@qq.com
@file: LineChart自定义xy轴 @file: CustomXYaxis
@description: @description:
''' '''
import random import random
@ -16,7 +16,6 @@ from PyQt5.QtChart import QChartView, QLineSeries, QChart, QCategoryAxis
from PyQt5.QtCore import Qt from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QApplication, QWidget, QHBoxLayout from PyQt5.QtWidgets import QApplication, QWidget, QHBoxLayout
__version__ = "0.0.1" __version__ = "0.0.1"
m_listCount = 3 m_listCount = 3

30
QChart/README.md Normal file
View file

@ -0,0 +1,30 @@
# QChart
## 1、折线图
[运行 LineChart.py](LineChart.py)
![LineChart](ScreenShot/LineChart.png)
## 2、折线堆叠图
[运行 LineStack.py](LineStack.py)
仿照 [line-stack](http://echarts.baidu.com/demo.html#line-stack)
![LineStack](ScreenShot/LineStack.gif)
## 3、柱状堆叠图
[运行 BarStack.py](BarStack.py)
仿照 [bar-stack](http://echarts.baidu.com/demo.html#bar-stack)
![BarStack](ScreenShot/BarStack.gif)
## 4、LineChart自定义xy轴
[运行 CustomXYaxis.py](CustomXYaxis.py)
![CustomXYaxis](ScreenShot/CustomXYaxis.png)
## 5、ToolTip提示
[运行 ToolTip.py](ToolTip.py) | [运行 ToolTip2.py](ToolTip2.py)
![ToolTip](ScreenShot/ToolTip.gif) ![ToolTip2](ScreenShot/ToolTip2.gif)

View file

Before

Width:  |  Height:  |  Size: 325 KiB

After

Width:  |  Height:  |  Size: 325 KiB

View file

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 327 KiB

After

Width:  |  Height:  |  Size: 327 KiB

View file

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

View file

Before

Width:  |  Height:  |  Size: 204 KiB

After

Width:  |  Height:  |  Size: 204 KiB

View file

@ -17,12 +17,10 @@ from PyQt5.QtGui import QPainter, QCursor
from PyQt5.QtWidgets import QApplication, QGraphicsProxyWidget, QLabel, \ from PyQt5.QtWidgets import QApplication, QGraphicsProxyWidget, QLabel, \
QWidget, QHBoxLayout, QVBoxLayout, QToolTip, QGraphicsLineItem QWidget, QHBoxLayout, QVBoxLayout, QToolTip, QGraphicsLineItem
__Author__ = "By: Irony.\"[讽刺]\nQQ: 892768447\nEmail: 892768447@qq.com" __Author__ = "By: Irony.\"[讽刺]\nQQ: 892768447\nEmail: 892768447@qq.com"
__Copyright__ = "Copyright (c) 2017 Irony.\"[讽刺]" __Copyright__ = "Copyright (c) 2017 Irony.\"[讽刺]"
__Version__ = "Version 1.0" __Version__ = "Version 1.0"
''' '''
class CircleWidget(QGraphicsProxyWidget): class CircleWidget(QGraphicsProxyWidget):
@ -82,7 +80,6 @@ class ToolTipItem(QWidget):
class ToolTipWidget(QWidget): class ToolTipWidget(QWidget):
Cache = {} Cache = {}
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@ -144,10 +141,13 @@ class ChartView(QChartView):
self.min_x, self.max_x = axisX.min(), axisX.max() self.min_x, self.max_x = axisX.min(), axisX.max()
self.min_y, self.max_y = axisY.min(), axisY.max() self.min_y, self.max_y = axisY.min(), axisY.max()
# 坐标系中左上角顶点 # 坐标系中左上角顶点
self.point_top = self._chart.mapToPosition(QPointF(self.min_x, self.max_y)) self.point_top = self._chart.mapToPosition(
QPointF(self.min_x, self.max_y))
# 坐标原点坐标 # 坐标原点坐标
self.point_bottom = self._chart.mapToPosition(QPointF(self.min_x, self.min_y)) self.point_bottom = self._chart.mapToPosition(
QPointF(self.min_x, self.min_y))
self.step_x = (self.max_x - self.min_x) / (axisX.tickCount() - 1) self.step_x = (self.max_x - self.min_x) / (axisX.tickCount() - 1)
# self.step_y = (self.max_y - self.min_y) / (axisY.tickCount() - 1) # self.step_y = (self.max_y - self.min_y) / (axisY.tickCount() - 1)
def mouseMoveEvent(self, event): def mouseMoveEvent(self, event):

View file

@ -17,12 +17,10 @@ from PyQt5.QtGui import QPainter, QCursor
from PyQt5.QtWidgets import QApplication, QGraphicsProxyWidget, QLabel, \ from PyQt5.QtWidgets import QApplication, QGraphicsProxyWidget, QLabel, \
QWidget, QHBoxLayout, QVBoxLayout, QToolTip, QGraphicsLineItem QWidget, QHBoxLayout, QVBoxLayout, QToolTip, QGraphicsLineItem
__Author__ = "By: Irony.\"[讽刺]\nQQ: 892768447\nEmail: 892768447@qq.com" __Author__ = "By: Irony.\"[讽刺]\nQQ: 892768447\nEmail: 892768447@qq.com"
__Copyright__ = "Copyright (c) 2017 Irony.\"[讽刺]" __Copyright__ = "Copyright (c) 2017 Irony.\"[讽刺]"
__Version__ = "Version 1.0" __Version__ = "Version 1.0"
''' '''
class CircleWidget(QGraphicsProxyWidget): class CircleWidget(QGraphicsProxyWidget):
@ -82,7 +80,6 @@ class ToolTipItem(QWidget):
class ToolTipWidget(QWidget): class ToolTipWidget(QWidget):
Cache = {} Cache = {}
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@ -150,6 +147,7 @@ class ChartView(QChartView):
self.point_bottom = self._chart.mapToPosition( self.point_bottom = self._chart.mapToPosition(
QPointF(self.min_x, self.min_y)) QPointF(self.min_x, self.min_y))
self.step_x = (self.max_x - self.min_x) / (axisX.tickCount() - 1) self.step_x = (self.max_x - self.min_x) / (axisX.tickCount() - 1)
# self.step_y = (self.max_y - self.min_y) / (axisY.tickCount() - 1) # self.step_y = (self.max_y - self.min_y) / (axisY.tickCount() - 1)
def mouseMoveEvent(self, event): def mouseMoveEvent(self, event):

View file

@ -5,7 +5,7 @@
}, },
{ {
"name": "微信管理", "name": "微信管理",
"icon": "weixin.png", "icon": "Data/weixin.png",
"badge": [ "badge": [
"火爆", "火爆",
"#F8AC54" "#F8AC54"

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -6,7 +6,7 @@ Created on 2018年4月8日
@author: Irony @author: Irony
@site: https://pyqt5.com, https://github.com/892768447 @site: https://pyqt5.com, https://github.com/892768447
@email: 892768447@qq.com @email: 892768447@qq.com
@file: @file: ParsingJson
@description: @description:
""" """
import json import json
@ -148,5 +148,5 @@ QTreeView:branch:selected {
""") """)
w = JsonTreeWidget() w = JsonTreeWidget()
w.show() w.show()
w.loadData('data.json') w.loadData('Data/data.json')
sys.exit(app.exec_()) sys.exit(app.exec_())

View file

@ -0,0 +1,8 @@
# QTreeWidget
## 1、通过json数据生成树形结构
[运行 ParsingJson.py](ParsingJson.py)
解析每一层json数据中的list
![ParsingJson](ScreenShot/ParsingJson.png)

View file

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View file

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 97 KiB

View file

@ -1,22 +0,0 @@
# 图表
## [1、PyQtChart](PyQtChart/)
### 1. [折线图](PyQtChart/charts/line/LineStack.py)
仿照 [line-stack](http://echarts.baidu.com/demo.html#line-stack)
![截图](PyQtChart/charts/line/ScreenShot/LineStack.gif)
### 2. [柱状图](PyQtChart/charts/bar/BarStack.py)
仿照 [bar-stack](http://echarts.baidu.com/demo.html#bar-stack)
![截图](PyQtChart/charts/bar/ScreenShot/BarStack.gif)
### 3. [LineChart](PyQtChart/demo/LineChart.py)
![截图](PyQtChart/demo/ScreenShot/LineChart.png)
### 4. [LineChart自定义xy轴](PyQtChart/demo/LineChart自定义xy轴.py)
![截图](PyQtChart/demo/ScreenShot/LineChart自定义xy轴.png)
### 5. [ToolTip提示](PyQtChart/demo/ToolTip.py)
![截图](PyQtChart/demo/ScreenShot/ToolTip.gif)

View file

@ -1,8 +0,0 @@
# 树结构
## [1、QTreeWidget](QTreeWidget/)
### 1.通过json数据生成树形结构
emmmmmm,原理就是那样,,解析每一层json数据中的list,美化就不想弄了.
![截图](QTreeWidget/Json生成QTreeWidget/ScreenShot/Json生成树形结构.png)