添加高分屏自适应
This commit is contained in:
@@ -230,6 +230,7 @@ class Analysis(QWidget):
|
|||||||
build_html.html_build(self._save_path,self.titles,ret_values)
|
build_html.html_build(self._save_path,self.titles,ret_values)
|
||||||
# 运行程序
|
# 运行程序
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_EnableHighDpiScaling)
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
main_window = Analysis()
|
main_window = Analysis()
|
||||||
main_window.show()
|
main_window.show()
|
||||||
|
@@ -39,6 +39,18 @@ def get_time():
|
|||||||
utc_time = utc_time.strftime("%Y-%m-%d %H:%M:%S")
|
utc_time = utc_time.strftime("%Y-%m-%d %H:%M:%S")
|
||||||
return utc_time
|
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.code_list_backcolor=False
|
||||||
self.ser=prot.protu()
|
self.ser=prot.protu()
|
||||||
self.widget = QWidget()
|
self.widget = QWidget()
|
||||||
|
self.widget.setStyleSheet (_QSS)
|
||||||
self.widget.resize(1500, 900)
|
self.widget.resize(1500, 900)
|
||||||
self.widget.setWindowTitle("批检仪赋码工具")
|
self.widget.setWindowTitle("批检仪赋码工具")
|
||||||
self.com_but_init()
|
self.com_but_init()
|
||||||
@@ -780,6 +793,7 @@ class coder(QObject):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_EnableHighDpiScaling)
|
||||||
c=coder()
|
c=coder()
|
||||||
c.init(b'00',b'AD',b'A',int(cpars.code_channel_list()[0]))
|
c.init(b'00',b'AD',b'A',int(cpars.code_channel_list()[0]))
|
||||||
c.run(10000)
|
c.run(10000)
|
||||||
|
@@ -20,6 +20,10 @@ QListView {
|
|||||||
show-decoration-selected: 1;
|
show-decoration-selected: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QWidget {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
@@ -56,6 +60,7 @@ class updata_dlg(QWidget):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_EnableHighDpiScaling)
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
dlg=updata_dlg()
|
dlg=updata_dlg()
|
||||||
dlg.show()
|
dlg.show()
|
||||||
|
Reference in New Issue
Block a user