PyQt/分割窗口的分割条重写/README.md
2018-03-21 20:57:06 +08:00

11 lines
No EOL
361 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.

# 分割窗口的分割条重绘
原理在于QSplitter在创建分割条的时候会调用createHandle函数
于是通过重新写createHandle返回自己的QSplitterHandle类
并通过QSplitterHandle的paintEvent实现绘制其它形状
重写mousePressEvent和mouseMoveEvent来实现鼠标的其它事件
## 截图
![截图](ScreenShot/1.gif)