PyQt/下拉选择联动/README.md
2018-01-29 00:11:27 +08:00

12 lines
No EOL
421 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.

# QComboBox下拉数据关联
这里简单的做了一个省市区关联的三级联动数据源在data.json中
主要用了QComboBox的setModel设置一个QSortFilterProxyModel过滤模型
并根据唯一编码过滤为了不影响内容显示唯一编码的角色为ToolTipRole
匆忙中写出来,可能有些不完善,或者该方式效率不是很高
# 截图
![截图1](ScreenShot/1.gif)