赞
踩
- from PyQt5 import QtCore, QtGui, QtWidgets
- from PyQt5.QtWidgets import QDesktopWidget #导入屏幕类
-
-
- class Ui_MainWindow(object):
- def setupUi(self, MainWindow):
- MainWindow.setObjectName("mignri")
- # MainWindow.setObjectName("窗口名称-小强")
-
- screen = QDesktopWidget().screenGeometry(); #获取屏幕大小
- width = screen.width(); #宽
- height = screen.height(); #窄
- MainWindow.resize(width/4, height/4)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。