From 81ff13f9e6f2dcd9fb9550d0a8efc8076d4507dd Mon Sep 17 00:00:00 2001 From: Irony <892768447@qq.com> Date: Fri, 2 Nov 2018 17:42:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .settings/org.eclipse.core.resources.prefs | 2 +- 下拉框/README.md | 11 +++++++++++ 下拉框/下拉选择联动/README.md | 12 ------------ .../ScreenShot/{1.gif => 下拉选择联动.gif} | Bin .../下拉选择联动/{ComboBox.py => 下拉选择联动.py} | 0 5 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 下拉框/README.md delete mode 100644 下拉框/下拉选择联动/README.md rename 下拉框/下拉选择联动/ScreenShot/{1.gif => 下拉选择联动.gif} (100%) rename 下拉框/下拉选择联动/{ComboBox.py => 下拉选择联动.py} (100%) diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index c3e9c55..b5c71c8 100644 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -1,6 +1,6 @@ eclipse.preferences.version=1 encoding//ActiveX/\u663E\u793Aword_excel_pdf.py=utf-8 -encoding//\u4E0B\u62C9\u6846/\u4E0B\u62C9\u9009\u62E9\u8054\u52A8/ComboBox.py=utf-8 +encoding//\u4E0B\u62C9\u6846/\u4E0B\u62C9\u9009\u62E9\u8054\u52A8/\u4E0B\u62C9\u9009\u62E9\u8054\u52A8.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/qrctest2.py=utf-8 diff --git a/下拉框/README.md b/下拉框/README.md new file mode 100644 index 0000000..1c6931c --- /dev/null +++ b/下拉框/README.md @@ -0,0 +1,11 @@ +# 下拉框 + +## [1、QComboBox下拉数据关联](下拉选择联动) + +这里简单的做了一个省市区关联的三级联动,数据源在data.json中 + +1. 主要用了`QComboBox`的`setModel`设置一个`QSortFilterProxyModel`过滤模型 +2. 并根据唯一编码过滤,为了不影响内容显示,唯一编码的角色为`ToolTipRole` +3. 匆忙中写出来,可能有些不完善,或者该方式效率不是很高(后来发现可以用`QColumnView`实现) + +![截图](下拉选择联动/ScreenShot/下拉选择联动.gif) \ No newline at end of file diff --git a/下拉框/下拉选择联动/README.md b/下拉框/下拉选择联动/README.md deleted file mode 100644 index 5d3e241..0000000 --- a/下拉框/下拉选择联动/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# QComboBox下拉数据关联 - -这里简单的做了一个省市区关联的三级联动,数据源在data.json中 - -主要用了QComboBox的setModel设置一个QSortFilterProxyModel过滤模型 - -并根据唯一编码过滤,为了不影响内容显示,唯一编码的角色为ToolTipRole - -匆忙中写出来,可能有些不完善,或者该方式效率不是很高 - -# 截图 -![截图1](ScreenShot/1.gif) \ No newline at end of file diff --git a/下拉框/下拉选择联动/ScreenShot/1.gif b/下拉框/下拉选择联动/ScreenShot/下拉选择联动.gif similarity index 100% rename from 下拉框/下拉选择联动/ScreenShot/1.gif rename to 下拉框/下拉选择联动/ScreenShot/下拉选择联动.gif diff --git a/下拉框/下拉选择联动/ComboBox.py b/下拉框/下拉选择联动/下拉选择联动.py similarity index 100% rename from 下拉框/下拉选择联动/ComboBox.py rename to 下拉框/下拉选择联动/下拉选择联动.py