摘要: # 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 默*为 阅读(1036) 评论(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 默*为 阅读(35) 评论(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 默*为 阅读(1338) 评论(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 默*为 阅读(32) 评论(0) 推荐(0) 编辑
摘要: import osimport subprocessimport socket"""python获取主机内网中所有MAC地址"""def get_local_net(): # 主机所在网段 # 获取主机名 hostname = socket.gethostname() # 获取主机的局域网ip lo 阅读全文
posted @ 2021-12-20 10:15 默*为 阅读(467) 评论(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 默*为 阅读(211) 评论(0) 推荐(0) 编辑
摘要: if texttmp != "": # 光标自动下移 self.textEdit.append(texttmp) QApplication.processEvents() self.textEdit.moveCursor(QTextCursor.End, QTextCursor.MoveAnchor 阅读全文
posted @ 2021-12-20 10:06 默*为 阅读(29) 评论(0) 推荐(0) 编辑
摘要: self.dateEdit.setCalendarPopup(True) # 日历增加 # 日历转化位str类型begintime = self.dateEdit.dateTime().toString("yyyy/MM/dd hh:mm:ss") 阅读全文
posted @ 2021-12-20 10:03 默*为 阅读(125) 评论(0) 推荐(0) 编辑
摘要: """清理项数,表头不会清除"""self.tableWidget_2.setRowCount(0)self.tableWidget_2.clearContents()QApplication.processEvents()"""添加行"""def additem(self, row, column 阅读全文
posted @ 2021-12-20 09:53 默*为 阅读(84) 评论(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 默*为 阅读(510) 评论(0) 推荐(0) 编辑
摘要: QTreeWidget{ font: 13pt "楷体"; color: rgb(26, 202, 255); border:1px solid rgb(170, 170, 127); border-radius:3px; /*background-color: rgb(161, 230, 254) 阅读全文
posted @ 2021-12-20 09:44 默*为 阅读(564) 评论(0) 推荐(0) 编辑
摘要: QCheckBox:!hover { color:white; border-radius:10px; border:1px solid rgb(170, 170, 127); background-color: rgb(255, 170, 127); font: 12pt "楷体"; } QChe 阅读全文
posted @ 2021-12-20 09:41 默*为 阅读(841) 评论(0) 推荐(0) 编辑
摘要: QSlider::groove:horizontal{ border:0px; height:15px; background:#deffe5; } QSlider::sub-page:horizontal{ background:#55ff00; } QSlider::add-page:horiz 阅读全文
posted @ 2021-12-20 09:41 默*为 阅读(123) 评论(0) 推荐(0) 编辑
摘要: QPushButton:!hover { color:white; font: 20pt "楷体"; border-radius:10px; border:1px solid rgb(170, 170, 127); background-color: rgb(255, 196, 147); } QP 阅读全文
posted @ 2021-12-20 09:40 默*为 阅读(533) 评论(0) 推荐(0) 编辑
摘要: QLineEdit{ border:1px groove gray; border-radius:18px; padding:2px 4px } QLineEdit:!hover { border-style:solid; border-color: rgb(170, 170, 127); } 阅读全文
posted @ 2021-12-20 09:39 默*为 阅读(1195) 评论(0) 推荐(0) 编辑