24 lines
802 B
Python
24 lines
802 B
Python
|
|
# coding: utf-8
|
||
|
|
from pathlib import Path
|
||
|
|
from qfluentwidgets import HorizontalFlipView, MessageBoxBase, SubtitleLabel
|
||
|
|
|
||
|
|
|
||
|
|
class CustomBgMessageBox(MessageBoxBase):
|
||
|
|
def __init__(self, parent=None):
|
||
|
|
super().__init__(parent=parent)
|
||
|
|
self.titleLabel = SubtitleLabel(parent=self)
|
||
|
|
self.titleLabel.setText("内设壁纸")
|
||
|
|
self.viewLayout.addWidget(self.titleLabel)
|
||
|
|
|
||
|
|
self.imageChoice = HorizontalFlipView(parent=self)
|
||
|
|
self.imageChoice.setBorderRadius(8)
|
||
|
|
for i in range(0, 6):
|
||
|
|
self.imageChoice.addImage(f"app\\resource\\images\\bg{i}.png")
|
||
|
|
self.viewLayout.addWidget(self.imageChoice)
|
||
|
|
|
||
|
|
self.yesButton.setText("确定")
|
||
|
|
self.cancelButton.hide()
|
||
|
|
|
||
|
|
def returnImage(self):
|
||
|
|
return self.imageChoice.currentIndex()
|