摘要: # python调用c/c++方法:一般先将c++代码转化为C类型dll(推荐使用静态dll,否则容易出现各种链接库问题;记得使用extern "C" _declspec(dllexport))# extern "C" _declspec(dllexport) int iadd(int a ,int 阅读全文
posted @ 2021-12-20 18:37 默*为 阅读(1059) 评论(0) 推荐(0)
摘要: class Test(QtWidgets.QMainWindow, Ui_dlg): def closeEvent(self, e): #to do super().closeEvent(e) def __init__(self): super(Test, self).__init__() self 阅读全文
posted @ 2021-12-20 17:36 默*为 阅读(46) 评论(0) 推荐(0)
摘要: class MyThreadSound(threading.Thread): def __init__(self): super(MyThreadSound, self).__init__() self.isexit = False self.ispause = True self.pausetim 阅读全文
posted @ 2021-12-20 14:45 默*为 阅读(1373) 评论(0) 推荐(0)
摘要: 1.编译qrcpyrcc5 -o ico_rc.py ./ico/ico.qrc.qrc文件格式<RCC> <qresource prefix="/"> <file>--.ico</file> <file>++.ico</file> </qresource></RCC> 2.编译uipyuic5 - 阅读全文
posted @ 2021-12-20 10:23 默*为 阅读(38) 评论(0) 推荐(0)
摘要: import osimport subprocessimport socket"""python获取主机内网中所有MAC地址"""def get_local_net(): # 主机所在网段 # 获取主机名 hostname = socket.gethostname() # 获取主机的局域网ip lo 阅读全文
posted @ 2021-12-20 10:15 默*为 阅读(519) 评论(0) 推荐(1)
摘要: icon = QtGui.QIcon()icon.addPixmap(QtGui.QPixmap("I.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)for im in testx: """ 添加项 """ item = QtWidgets.QTreeWidg 阅读全文
posted @ 2021-12-20 10:09 默*为 阅读(220) 评论(0) 推荐(0)
摘要: if texttmp != "": # 光标自动下移 self.textEdit.append(texttmp) QApplication.processEvents() self.textEdit.moveCursor(QTextCursor.End, QTextCursor.MoveAnchor 阅读全文
posted @ 2021-12-20 10:06 默*为 阅读(36) 评论(0) 推荐(0)
摘要: self.dateEdit.setCalendarPopup(True) # 日历增加 # 日历转化位str类型begintime = self.dateEdit.dateTime().toString("yyyy/MM/dd hh:mm:ss") 阅读全文
posted @ 2021-12-20 10:03 默*为 阅读(130) 评论(0) 推荐(0)
摘要: """清理项数,表头不会清除"""self.tableWidget_2.setRowCount(0)self.tableWidget_2.clearContents()QApplication.processEvents()"""添加行"""def additem(self, row, column 阅读全文
posted @ 2021-12-20 09:53 默*为 阅读(91) 评论(0) 推荐(0)
摘要: QTableWidget { border:1px solid rgb(170, 170, 127); border-radius:3px; } QScrollBar::handle { background:rgb(255, 196, 147); border:1px solid rgb(170, 阅读全文
posted @ 2021-12-20 09:47 默*为 阅读(570) 评论(0) 推荐(0)