PyQt/QGridLayout/README.md
2019-05-22 11:07:42 +08:00

21 lines
No EOL
726 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# QListView
- 目录
- [腾讯视频热播列表](#1腾讯视频热播列表)
## 1、腾讯视频热播列表
[运行 HotPlaylist.py](HotPlaylist.py)
简单思路说明:
- 利用`QScrollArea`滚动显示,`QGridLayout`做布局来放置自定义的Widget
- `QNetworkAccessManager`异步下载网页和图片
- `QScrollArea`滚动到底部触发下一页加载
自定义控件说明:
- 主要是多个layout和控件的结合其中图片`QLabel`为自定义,通过`setPixmap`设置图片,重写`paintEvent`绘制底部渐变矩形框和白色文字
- 字体颜色用qss设置
- 图标利用了`QSvgWidget`显示可以是svg 动画(如圆形加载图)
![HotPlaylist](ScreenShot/HotPlaylist.gif)