首先,这是我的代码:
class Fillscreen(QtGui.QWidget, Ui_View):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent,)
self.setupUi(self)
def full(self):
self.showMaximized()
if __name__ == '__main__':
app = QtGui.QApplication(sys.argv)
monitors = selector.getMonitors()
resolutions = selector.getResolution(monitors)
for monitor in monitors:
window = Fillscreen()
window.move(monitor[0],monitor[1])
window.full()
app.exec_()
monitors
看起来像这样:
[(-1280, 0, 0, 1024), (0, 0, 1920, 1080), (1920, 0, 3840, 1080)]
它只创建一个窗口,这绝对有意义,因为im在每个循环上覆盖window
。
为了解决这个问题,我可以手动创建一个window1
、window2
和window3
但是当我不能确定监视器的数量时,我该怎么做呢
使用^{} :
相关问题 更多 >
编程相关推荐