添加高分屏自适应
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user