1 Star 0 Fork 0

leonyan2020/pyCoating

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
TechnologyDetail.py 1.66 KB
一键复制 编辑 原始数据 按行查看 历史
leonyan2020 提交于 2021-12-19 02:32 . V0.16
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/9/14 12:52
# @Author : leon yan
# @Site :
# @File : TechnologyDetail.py
# @Software: PyCharm
import Globalist as gl
from PyQt5.QtCore import pyqtSlot, QFile, QIODevice, QTextStream, Qt, QDir, QFileInfo, pyqtSignal, QStringListModel
from PyQt5.QtWidgets import (QApplication, QMainWindow, QMessageBox, QListWidgetItem, QFileDialog, QAbstractItemView)
from resource.TechnologyDetail_ui import Ui_QWFormTable
class QTechnologyDetail(QMainWindow, Ui_QWFormTable):
bCloseDetailData = pyqtSignal()
def __init__(self, parent=None, *args, **kwargs):
super().__init__(parent, *args, **kwargs)
self.setupUi(self)
# gl.init() # 调试用
self.catalogType = {}
# self._FlagEditable = (Qt.ItemIsSelectable | Qt.ItemIsUserCheckable | Qt.ItemIsEnabled | Qt.ItemIsEditable)
# self._FlagNotEditable = (Qt.ItemIsSelectable | Qt.ItemIsUserCheckable | Qt.ItemIsEnabled)
self.model = QStringListModel(self)
self.listDeviceView.setEditTriggers(QAbstractItemView.NoEditTriggers)
aa = []
for key, value in gl.global_var["deviceDict"].items():
aa.append(value[0] + "_" + value[1])
self.model.setStringList(aa)
self.listDeviceView.setModel(self.model)
self.logDir = r"./log/log.log"
def __del__(self): # 析构函数
print("QTechnologyDetail is deleted")
@pyqtSlot()
def on_btnTechnology_clicked(self):
self.bCloseDetailData.emit()
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
objWindow = QTechnologyDetail()
objWindow.show()
sys.exit(app.exec_())
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/leonyan2020/pyCoating.git
git@gitee.com:leonyan2020/pyCoating.git
leonyan2020
pyCoating
pyCoating
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385