代码拉取完成,页面将自动刷新
#!/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_())
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。