def setLayouts(self): self.mainLayout = QVBoxLayout() self.mainLayout.addWidget(self.header) self.mainLayout.addWidget(self.line1) self.contentLayout = QHBoxLayout() self.contentLayout.setStretch(0, 70) self.contentLayout.setStretch(1, 570) self.contentLayout.addWidget(self.navigation) self.contentLayout.addWidget(self.mainContents) self.contentLayout.setSpacing(0) self.contentLayout.setContentsMargins(0, 0, 0, 0) self.mainLayout.addLayout(self.contentLayout) self.mainLayout.addWidget(self.playWidgets) self.mainLayout.setStretch(0, 43) self.mainLayout.setStretch(1, 0) self.mainLayout.setStretch(2, 576) self.mainLayout.setStretch(3, 50) self.mainLayout.setSpacing(0) self.mainLayout.setContentsMargins(0, 0, 0, 0) self.setLayout(self.mainLayout)
def setHeader(self): # self.titleLabel = QLabel("我的下载") self.spaceLine = QFrame(self) self.spaceLine.setObjectName("spaceLine") self.spaceLine.setFrameShape(QFrame.HLine) self.spaceLine.setFrameShadow(QFrame.Plain) self.spaceLine.setLineWidth(2) self.currentStorageFolderLabel = QLabel("当前存储目录: ") self.currentStorageFolder = QLabel() self.selectButton = QPushButton("选择目录") self.selectButton.setObjectName('selectButton') self.topShowLayout = QHBoxLayout() self.topShowLayout.addSpacing(20) # self.topShowLayout.addWidget(self.titleLabel) self.topShowLayout.addWidget(self.currentStorageFolderLabel) self.topShowLayout.addWidget(self.currentStorageFolder) self.topShowLayout.addWidget(self.selectButton) self.topShowLayout.addStretch(1) self.mainLayout.addLayout(self.topShowLayout) self.mainLayout.addWidget(self.spaceLine)
def setLayouts(self): self.mainLayout = QVBoxLayout() self.topLayout = QHBoxLayout() self.descriptionLayout = QVBoxLayout() self.titleLayout = QHBoxLayout() self.titleLayout.addWidget(self.showButton) self.titleLayout.addSpacing(5) self.titleLayout.addWidget(self.titleLabel) self.authorLayout = QHBoxLayout() self.authorLayout.addWidget(self.authorPic) self.authorLayout.addWidget(self.authorName) self.authorLayout.addStretch(1) self.descriptLayout = QHBoxLayout() self.descriptLayout.addWidget(self.descriptionButton) self.descriptLayout.addWidget(self.descriptionLabel) self.descriptionLayout.addLayout(self.titleLayout) self.descriptionLayout.addLayout(self.authorLayout) self.descriptionLayout.addSpacing(5) self.descriptionLayout.addWidget(self.playAllButton) self.descriptionLayout.addSpacing(10) self.descriptionLayout.addLayout(self.descriptLayout) self.descriptionLayout.setSpacing(0) self.topLayout.addWidget(self.picLabel) self.topLayout.addSpacing(18) self.topLayout.addLayout(self.descriptionLayout) self.mainLayout.addLayout(self.topLayout) self.mainLayout.addWidget(self.contentsTab) self.frame.setLayout(self.mainLayout)
def setHeader(self): self.spaceLine = QFrame(self) self.spaceLine.setObjectName("spaceLine") self.spaceLine.setFrameShape(QFrame.HLine) self.spaceLine.setFrameShadow(QFrame.Plain) self.spaceLine.setLineWidth(2) self.recommendLabel = QLabel("你的专属推荐~❤") self.topShowLayout = QHBoxLayout() self.topShowLayout.addSpacing(20) # self.topShowLayout.addWidget(self.titleLabel) self.topShowLayout.addWidget(self.recommendLabel) self.topShowLayout.addStretch(1) self.mainLayout.addLayout(self.topShowLayout) self.mainLayout.addWidget(self.spaceLine)
def setTopShow(self): self.showLabel = QLabel("本地音乐") self.spaceLine = QFrame(self) self.spaceLine.setObjectName("spaceLine") self.spaceLine.setFrameShape(QFrame.HLine) self.spaceLine.setFrameShadow(QFrame.Plain) self.spaceLine.setLineWidth(2) self.selectButton = QPushButton("选择目录") self.selectButton.setObjectName('selectButton') self.topShowLayout = QHBoxLayout() self.topShowLayout.addSpacing(20) self.topShowLayout.addWidget(self.showLabel) self.topShowLayout.addWidget(self.selectButton) self.topShowLayout.addStretch(1) self.mainLayout.addLayout(self.topShowLayout) self.mainLayout.addWidget(self.spaceLine)
def setLayouts(self): """设置布局。""" self.mainLayout = QHBoxLayout() self.mainLayout.setSpacing(0) self.mainLayout.addWidget(self.logoLabel) self.mainLayout.addWidget(self.descriptionLabel) self.mainLayout.addSpacing(70) self.mainLayout.addWidget(self.prevButton) self.mainLayout.addWidget(self.nextButton) self.mainLayout.addSpacing(10) self.mainLayout.addWidget(self.searchLine) self.mainLayout.addStretch(1) self.mainLayout.addWidget(self.userPix) self.mainLayout.addSpacing(7) self.mainLayout.addWidget(self.loginButton) self.mainLayout.addSpacing(7) self.mainLayout.addWidget(self.line1) self.mainLayout.addSpacing(30) self.mainLayout.addWidget(self.showminButton) self.mainLayout.addSpacing(3) self.mainLayout.addWidget(self.closeButton) self.setLayout(self.mainLayout)