def __init__(self, parent=None):
super().__init__()
self.parent = parent
self.setWindowTitle(self.tr("System Location"))
self.setLayout(QVBoxLayout())
self.layout().setAlignment(Qt.AlignCenter)
layout = QHBoxLayout()
self.layout().addLayout(layout)
worldMap = QLabel()
worldMap.setFixedSize(480, 283)
worldMap.setScaledContents(True)
worldMap.setPixmap(QPixmap(":/images/world.svg"))
layout.addWidget(worldMap)
hlayout = QHBoxLayout()
self.layout().addLayout(hlayout)
cLabel = QLabel()
cLabel.setText(self.tr("Region:"))
hlayout.addWidget(cLabel)
self.cBox = QComboBox()
self.cBox.setFixedWidth(300)
hlayout.addWidget(self.cBox)
hlayout.addSpacerItem(QSpacerItem(40, 20, QSizePolicy.Preferred, QSizePolicy.Expanding))
iLabel = QLabel()
iLabel.setText(self.tr("City:"))
hlayout.addWidget(iLabel)
self.iBox = QComboBox()
self.iBox.setFixedWidth(300)
hlayout.addWidget(self.iBox)
self.cBox.addItems(zone)
info = zone_info[self.cBox.currentText()]
info.sort()
self.iBox.addItems(info)
self.parent.lilii_settings["timezone"] = "{}/{}".format(self.cBox.currentText() , self.iBox.currentText())
self.cBox.currentTextChanged.connect(self.zoneChanged)
self.iBox.currentTextChanged.connect(self.cityChanged)
评论列表
文章目录