资源简介
通过PYQT5做的一个桌面小工具,连接sqlite数据库,自定义表格展示数据,以及表格点击显示出详细数据,供大家参考。
代码片段和文件信息
from PyQt5.Qt import *
from main_menue import Ui_man
from my_db import ado_mydadb
class main_me(QWidgetUi_man):
que=ado_mydadb()
def __init__(self parent=None):
“““
设置一些表格样式
“““
super(main_me self).__init__(parent)
self.setupUi(self)
self.show_data()
@pyqtSlot(intint)
def on_etl_job_list_cellClicked(self row column):
print(“表格被点击了“)
print(self.etl_job_list.currentRow())
c_row = self.etl_job_list.currentRow()
etl_job = self.etl_job_list.item(c_row 0).text()
self.show_dept_data(etl_job)
def show_dept_data(selfetl_job):
sel_cnt = self.etl_job_list.selectedRanges()
print(sel_cnt)
if not sel_cnt:
print(“未选中作业“)
else :
if self.dept_type_all.isChecked():
print(“全部被选中“)
updn_dep = ‘1‘
elif self.dept_up.isChecked():
print(“上游被选中“)
updn_dep = ‘2‘
elif self.dept_down.isChecked():
print(“下游被选中“)
updn_dep = ‘3‘
if self.denpt_all.isChecked():
print(“所有被选中“)
dep = ‘1‘
elif self.one_dept.isChecked():
print(“一层依赖“)
dep = ‘2‘
elif self.two_dept.isChecked():
print(“两层依赖“)
dep = ‘3‘
if updn_dep == ‘1‘ and dep == ‘1‘:
pass
elif updn_dep == ‘1‘ and dep == ‘2‘:
dep_job_sql = “““
select
case
when t1.etl_job = ‘etl_job_code‘ then ‘上游‘
else ‘下游‘
end as dep_type
case
when t1.etl_job = ‘etl_job_code‘ then t1.dependent_job
else t1.etl_job
end as etl_job
case
when t1.etl_job = ‘etl_job_code‘ then t3.etl_job_nm
else t2.etl_job_nm
end as etl_job_nm
t2.job_status
from rdm_etl_job_dependent t1
left join rdm_etl_job_ctrl t2
on t1.etl_job = t2.etl_job
left join rdm_etl_job_ctrl t3
on t1.dependent_job = t3.etl_job
where t1.etl_job = ‘etl_job_code‘
or dependent_job = ‘etl_job_code‘
order by 1
“““
new_etl_job_sql = dep_job_sql.replace(“etl_job_code“etl_job)
print(new_etl_job_sql)
elif updn_dep == ‘1‘ and dep == ‘3‘:
pass
elif updn_dep == ‘2‘ and dep == ‘1‘:
pass
elif updn_dep == ‘2‘ and dep == ‘2‘:
pass
e
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 131072 2019-10-08 17:13 mydb.db
文件 16617 2019-10-17 17:04 unti
文件 12148 2019-10-09 16:26 main.py
文件 15476 2019-10-17 17:06 main_menue.py
文件 2276 2019-10-07 11:47 my_db.py
----------- --------- ---------- ----- ----
177589 5
相关资源
- sqlite3.h头文件
- SQLite网络化工具包
- sqlite数据库和excel的互相导入导出
- iOS sqlite3的使用増删改查
- 利用SQLite设计生成一个学生数据库并
- SQLite3图形界面数据库查看工具
- wxSqlite3 for Delphi
- linux环境下QT语言写的学生成绩管理系
- SQLite Expert Professional激活码,亲测有效
- sqlite3.dll
- 简易通讯录SQLite实现
- sqlite网络版.rar
- Sqlite3对于2进制数据的操作。
- 带加密的sqlite
- 全国城市数据库plist文件和sqlite文件
- SQLite的使用
- CppSQLite基于SQLite 3.4.0
- SQLite.Interop.dll x32 x64
- SQLite3基础教程(高清PDF中文版)
- Qt_SQlite的两个简单例程
- Ubuntu下安装sqlite3数据库
- boa与数据库数据交互的
- linux多人聊天室
- Winfrom简单的SQLite数据库使用 vs2010版
- system.data.sqlite配置资源和方案.
- Unity支持Sqlite数据库资源包
- Nodejs操作Sqlite3数据库封装
- electron-v7.1-win32-x64.zip
- System.Data.SQLite.dll 32位和64位
- ECMWF ERA5数据集api cdsapi
评论
共有 条评论