添加高分屏自适应

This commit is contained in:
2023-11-06 23:34:20 +08:00
parent fb3334d844
commit 4671f6220e
3 changed files with 20 additions and 0 deletions

View File

@@ -39,6 +39,18 @@ def get_time():
utc_time = utc_time.strftime("%Y-%m-%d %H:%M:%S")
return utc_time
_QSS="""
QListView {
border: 1px solid white;
border-radius: 3px;
show-decoration-selected: 1;
}
QWidget {
font-size: 16px;
}
"""
@@ -61,6 +73,7 @@ class coder(QObject):
self.code_list_backcolor=False
self.ser=prot.protu()
self.widget = QWidget()
self.widget.setStyleSheet (_QSS)
self.widget.resize(1500, 900)
self.widget.setWindowTitle("批检仪赋码工具")
self.com_but_init()
@@ -780,6 +793,7 @@ class coder(QObject):
if __name__ == "__main__":
QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_EnableHighDpiScaling)
c=coder()
c.init(b'00',b'AD',b'A',int(cpars.code_channel_list()[0]))
c.run(10000)