48 lines
1.1 KiB
Python
48 lines
1.1 KiB
Python
import PySide6
|
|
from PySide6 import QtWidgets
|
|
|
|
from src import Icon, __author__, __version__
|
|
|
|
from .dialog_sources.about_ui import Ui_about
|
|
|
|
|
|
class About(QtWidgets.QDialog, Ui_about):
|
|
def __init__(self, parent=None):
|
|
super().__init__(parent)
|
|
self.setupUi(self)
|
|
self.setWindowIcon(Icon("info").icon)
|
|
self.setWindowTitle("About")
|
|
self.setInfo()
|
|
|
|
def test(self):
|
|
pass
|
|
|
|
def setInfo(self):
|
|
# add left most column to columnview
|
|
data = {
|
|
"Version": __version__,
|
|
"Author": __author__,
|
|
"PySide6 Version": PySide6.__version__,
|
|
"License": "MIT License",
|
|
"Icons": """Google Material Design Icons (https://fonts.google.com/icons)
|
|
StableDiffusion (logo)
|
|
svgrepo (https://www.svgrepo.com)""",
|
|
}
|
|
description = ""
|
|
for key, value in data.items():
|
|
description += f"{key}: {value}\n"
|
|
self.description.setText(description)
|
|
|
|
pass
|
|
|
|
|
|
def launch_about():
|
|
app = QtWidgets.QApplication([])
|
|
window = About()
|
|
window.show()
|
|
app.exec()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
pass
|