forked from PyQt5/PyQt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
92 changed files
with
550 additions
and
1,442 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
''' | ||
Created on 2017年12月28日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: charts.bar.BarStack | ||
@description: like http://echarts.baidu.com/demo.html#bar-stack | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
''' | ||
Created on 2017年12月28日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: charts.line.LineStack | ||
@description: like http://echarts.baidu.com/demo.html#line-stack | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
''' | ||
Created on 2017年12月23日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: ToolTip | ||
@description: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
''' | ||
Created on 2017年12月23日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: ToolTip2 | ||
@description: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
""" | ||
Created on 2018年1月27日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: CityLinkage | ||
@description: 下拉联动 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
''' | ||
Created on 2018年2月4日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: TencentMovieHotPlay_Flow | ||
@description: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
''' | ||
""" | ||
Created on 2017年12月23日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: 添加QWidget | ||
@file: AddQWidget | ||
@description: | ||
''' | ||
""" | ||
import sys | ||
|
||
from PyQt5.QtCore import Qt | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# QGraphicsView | ||
|
||
## 1、绘制世界地图 | ||
[运行 WorldMap.py](WorldMap.py) | ||
|
||
1. 解析json数据生成 `QPolygonF` | ||
2. 使用Ctrl+滑轮进行放大缩小 | ||
|
||
![WorldMap](ScreenShot/WorldMap.gif) | ||
|
||
## 2、添加QWidget | ||
[运行 AddQWidget.py](AddQWidget.py) | ||
|
||
通过 `QGraphicsScene.addWidget` 添加自定义QWidget | ||
|
||
![AddQWidget](ScreenShot/AddQWidget.png) |
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
''' | ||
""" | ||
Created on 2017年12月17日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: WorldMap | ||
@description: | ||
''' | ||
""" | ||
import json | ||
import math | ||
|
||
|
@@ -128,7 +128,7 @@ def scaleView(self, scaleFactor): | |
|
||
def initMap(self): | ||
features = json.load( | ||
open("world.json", encoding="utf8")).get("features") | ||
open("Data/world.json", encoding="utf8")).get("features") | ||
for feature in features: | ||
geometry = feature.get("geometry") | ||
if not geometry: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
''' | ||
Created on 2018年2月4日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: TencentMovieHotPlay | ||
@description: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
''' | ||
Created on 2017年12月23日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: ShowImage | ||
@description: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
''' | ||
Created on 2018年2月4日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: TencentMovieHotPlay_ListWidget | ||
@description: | ||
|
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# QPropertyAnimation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Animation | ||
# QPropertyAnimation | ||
|
||
# 1、窗口淡入淡出 | ||
[运行 FadeInOut.py](FadeInOut.py) | ||
|
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
''' | ||
Created on 2017年12月10日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: GetCookie | ||
@description: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
''' | ||
Created on 2017年12月10日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: GetCookie | ||
@description: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
''' | ||
Created on 2018年05月01日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@email: [email protected] | ||
@file: qrctest1 | ||
@description: | ||
''' | ||
|
||
from PyQt5.QtGui import QPixmap | ||
from PyQt5.QtWidgets import QLabel | ||
|
||
import res_rc # @UnusedImport @UnresolvedImport | ||
|
||
|
||
__Author__ = "By: Irony.\"[讽刺]\nQQ: 892768447\nEmail: [email protected]" | ||
__Copyright__ = "Copyright (c) 2017 Irony.\"[讽刺]" | ||
__Version__ = "Version 1.0" | ||
|
||
|
||
class ImageView(QLabel): | ||
|
||
def __init__(self, *args, **kwargs): | ||
super(ImageView, self).__init__(*args, **kwargs) | ||
self.resize(800, 600) | ||
|
||
# 从资源文件res_rc.py中加载 | ||
# 转换命令pyrcc5 res.qrc -o res_rc.py | ||
# 这种方式是从通过pyrcc5转换res.qrc为res_rc.py文件,可以直接import加载 | ||
# 此时可以通过路径:/images/head.jpg来访问 | ||
self.setPixmap(QPixmap(":/images/head.jpg")) | ||
|
||
|
||
if __name__ == "__main__": | ||
import sys | ||
from PyQt5.QtWidgets import QApplication | ||
app = QApplication(sys.argv) | ||
app.aboutToQuit.connect(res_rc.qCleanupResources) # 退出时要清理资源 | ||
w = ImageView() | ||
w.show() | ||
sys.exit(app.exec_()) | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
''' | ||
Created on 2018年05月01日 | ||
@author: Irony."[讽刺] | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: qrctest1 | ||
@description: | ||
''' | ||
|
||
from PyQt5.QtGui import QPixmap | ||
from PyQt5.QtWidgets import QLabel | ||
|
||
import res_rc # @UnusedImport @UnresolvedImport | ||
|
||
|
||
__Author__ = "By: Irony.\"[讽刺]\nQQ: 892768447\nEmail: [email protected]" | ||
__Copyright__ = "Copyright (c) 2017 Irony.\"[讽刺]" | ||
__Version__ = "Version 1.0" | ||
|
||
|
||
class ImageView(QLabel): | ||
|
||
def __init__(self, *args, **kwargs): | ||
super(ImageView, self).__init__(*args, **kwargs) | ||
self.resize(800, 600) | ||
|
||
# 从资源文件res_rc.py中加载 | ||
# 转换命令pyrcc5 res.qrc -o res_rc.py | ||
# 这种方式是从通过pyrcc5转换res.qrc为res_rc.py文件,可以直接import加载 | ||
# 此时可以通过路径:/images/head.jpg来访问 | ||
self.setPixmap(QPixmap(":/images/head.jpg")) | ||
|
||
|
||
if __name__ == "__main__": | ||
import sys | ||
from PyQt5.QtWidgets import QApplication | ||
app = QApplication(sys.argv) | ||
app.aboutToQuit.connect(res_rc.qCleanupResources) # 退出时要清理资源 | ||
w = ImageView() | ||
w.show() | ||
sys.exit(app.exec_()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
''' | ||
Created on 2018年05月01日 | ||
@author: Irony."[讽刺] | ||
@site: http://alyl.vip, http://orzorz.vip, https://coding.net/u/892768447, https://github.com/892768447 | ||
@email: [email protected] | ||
@file: qrctest2 | ||
@description: | ||
''' | ||
|
||
|
||
from PyQt5.QtCore import QResource | ||
from PyQt5.QtGui import QPixmap | ||
from PyQt5.QtWidgets import QLabel | ||
|
||
|
||
__Author__ = "By: Irony.\"[讽刺]\nQQ: 892768447\nEmail: [email protected]" | ||
__Copyright__ = "Copyright (c) 2017 Irony.\"[讽刺]" | ||
__Version__ = "Version 1.0" | ||
|
||
|
||
class ImageView(QLabel): | ||
|
||
def __init__(self, *args, **kwargs): | ||
super(ImageView, self).__init__(*args, **kwargs) | ||
self.resize(800, 600) | ||
self.setPixmap(QPixmap(":/images/head.jpg")) | ||
|
||
|
||
if __name__ == "__main__": | ||
import sys | ||
from PyQt5.QtWidgets import QApplication | ||
app = QApplication(sys.argv) | ||
# 从二进制资源文件res.data中加载 | ||
# 转换命令cd tools | ||
# rcc.exe -binary ../res.qrc -o ../res.data | ||
# 此时需要注册 | ||
QResource.registerResource("res.data") | ||
app.aboutToQuit.connect(lambda: QResource.unregisterResource("res.data")) | ||
w = ImageView() | ||
w.show() | ||
sys.exit(app.exec_()) | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
''' | ||
Created on 2018年05月01日 | ||
@author: Irony."[讽刺] | ||
@site: https://pyqt5.com https://github.com/892768447 | ||
@email: [email protected] | ||
@file: qrctest2 | ||
@description: | ||
''' | ||
|
||
|
||
from PyQt5.QtCore import QResource | ||
from PyQt5.QtGui import QPixmap | ||
from PyQt5.QtWidgets import QLabel | ||
|
||
|
||
__Author__ = "By: Irony.\"[讽刺]\nQQ: 892768447\nEmail: [email protected]" | ||
__Copyright__ = "Copyright (c) 2017 Irony.\"[讽刺]" | ||
__Version__ = "Version 1.0" | ||
|
||
|
||
class ImageView(QLabel): | ||
|
||
def __init__(self, *args, **kwargs): | ||
super(ImageView, self).__init__(*args, **kwargs) | ||
self.resize(800, 600) | ||
self.setPixmap(QPixmap(":/images/head.jpg")) | ||
|
||
|
||
if __name__ == "__main__": | ||
import sys | ||
from PyQt5.QtWidgets import QApplication | ||
app = QApplication(sys.argv) | ||
# 从二进制资源文件res.data中加载 | ||
# 转换命令cd tools | ||
# rcc.exe -binary ../res.qrc -o ../res.data | ||
# 此时需要注册 | ||
QResource.registerResource("res.data") | ||
app.aboutToQuit.connect(lambda: QResource.unregisterResource("res.data")) | ||
w = ImageView() | ||
w.show() | ||
sys.exit(app.exec_()) |
Oops, something went wrong.