2024-09-14 23:58:11 +08:00
|
|
|
from PyQt5.QtWidgets import QWidget, QHBoxLayout, QLabel, QSizePolicy
|
|
|
|
from PyQt5.QtGui import QPixmap
|
2024-09-09 17:40:40 +08:00
|
|
|
class AboutWidget(QWidget):
|
|
|
|
def __init__(self, typex="init"):
|
2024-09-13 22:50:29 +08:00
|
|
|
super().__init__()
|
2024-09-14 23:58:11 +08:00
|
|
|
self.base = QHBoxLayout()
|
|
|
|
|
|
|
|
logo = QPixmap("resources/logo.png")
|
|
|
|
logo_label = QLabel()
|
|
|
|
logo_label.setPixmap(logo)
|
|
|
|
logo_label.setScaledContents(True)
|
|
|
|
# 自适应图片大小
|
|
|
|
logo_label.setFixedSize(int(logo_label.height() * 0.4), int(logo_label.height() * 0.4))
|
|
|
|
# logo_label.setFixedSize(50, 50)
|
|
|
|
self.base.addWidget(logo_label)
|
|
|
|
|
2024-09-13 22:50:29 +08:00
|
|
|
self.setLayout(self.base)
|