模仿“悄悄股票桌面盯盘助手”源码分享

查看 108|回复 9
作者:999CWCR999   
[color=]模仿“悄悄股票桌面盯盘助手”源码分享
[color=]因能力有限,只做了这几个界面,现将源码分享出来。









[Python] 纯文本查看 复制代码# coding:utf-8
import os
import sys
from PyQt5.QtCore import Qt, QTranslator
from PyQt5.QtWidgets import QApplication
from qfluentwidgets import FluentTranslator
from app.common.config import cfg
from app.view.main_window import MainWindow
# enable dpi scale
if cfg.get(cfg.dpiScale) == "Auto":
    QApplication.setHighDpiScaleFactorRoundingPolicy(
        Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)
    QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
else:
    os.environ["QT_ENABLE_HIGHDPI_SCALING"] = "0"
    os.environ["QT_SCALE_FACTOR"] = str(cfg.get(cfg.dpiScale))
QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps)
# create application
app = QApplication(sys.argv)
app.setAttribute(Qt.AA_DontCreateNativeWidgetSiblings)
# internationalization
locale = cfg.get(cfg.language).value
translator = FluentTranslator(locale)
galleryTranslator = QTranslator()
galleryTranslator.load(locale, "gallery", ".", ":/gallery/i18n")
app.installTranslator(translator)
app.installTranslator(galleryTranslator)
# create main window
w = MainWindow()
w.show()
app.exec_()
[Python] 纯文本查看 复制代码# coding: utf-8
from PyQt5.QtCore import QUrl, QSize, Qt, QPoint, QRect, QPropertyAnimation
from PyQt5.QtGui import QIcon, QDesktopServices, QPainter, QColor, QFont
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QHBoxLayout, QGraphicsOpacityEffect
from qfluentwidgets import FluentIcon as FIF, CaptionLabel
from qfluentwidgets import (NavigationItemPosition, FluentWindow,
                            SplashScreen, FluentIcon, SingleDirectionScrollArea, isDarkTheme, SimpleCardWidget,
                            ImageLabel, TitleLabel, PrimaryPushButton, HyperlinkLabel, VerticalSeparator, BodyLabel,
                            PillPushButton, setFont, TransparentToolButton, HeaderCardWidget, HorizontalFlipView,
                            IconWidget, InfoBarIcon)
from qfluentwidgets.components.widgets.acrylic_label import AcrylicBrush
from .basic_input_interface import BasicInputInterface
from .gallery_interface import GalleryInterface
from .setting_interface import SettingInterface
from .view_interface import ViewInterface
from ..common.config import ZH_SUPPORT_URL, EN_SUPPORT_URL, cfg
from ..common.signal_bus import signalBus
from ..common.translator import Translator
from ..common.icon import Icon
from ..common import resource
class StatisticsWidget(QWidget):
    """ Statistics widget """
    def __init__(self, title: str, value: str, parent=None):
        super().__init__(parent=parent)
        self.titleLabel = CaptionLabel(title, self)
        self.valueLabel = BodyLabel(value, self)
        self.vBoxLayout = QVBoxLayout(self)
        self.vBoxLayout.setContentsMargins(16, 0, 16, 0)
        self.vBoxLayout.addWidget(self.valueLabel, 0, Qt.AlignTop)
        self.vBoxLayout.addWidget(self.titleLabel, 0, Qt.AlignBottom)
        setFont(self.valueLabel, 18, QFont.DemiBold)
        self.titleLabel.setTextColor(QColor(96, 96, 96), QColor(206, 206, 206))
class AppInfoCard(SimpleCardWidget):
    """ App information card """
    def __init__(self, parent=None):
        super().__init__(parent)
        self.iconLabel = ImageLabel("app/resource/images/logo.png", self)
        self.iconLabel.setBorderRadius(8, 8, 8, 8)
        self.iconLabel.scaledToWidth(120)
        self.nameLabel = TitleLabel('【财运到】股票盯盘软件', self)
        self.scoreWidget = StatisticsWidget('平均分', '5.0', self)
        self.separator = VerticalSeparator(self)
        self.commentWidget = StatisticsWidget('下载数', '2.8K', self)
        self.descriptionLabel = BodyLabel(
            '【财运到】股票盯盘软件是一款适合坐班人员,在工作时"偷偷"摸鱼盯盘的软件,支持添加A股,港股,ETF,可转债等。',
            self)
        self.descriptionLabel.setWordWrap(True)
        # self.shareButton = TransparentToolButton(FluentIcon.SHARE, self)
        # self.shareButton.setFixedSize(32, 32)
        # self.shareButton.setIconSize(QSize(14, 14))
        self.hBoxLayout = QHBoxLayout(self)
        self.vBoxLayout = QVBoxLayout()
        self.topLayout = QHBoxLayout()
        self.statisticsLayout = QHBoxLayout()
        self.buttonLayout = QHBoxLayout()
        self.initLayout()
    def initLayout(self):
        self.hBoxLayout.setSpacing(30)
        self.hBoxLayout.setContentsMargins(34, 24, 24, 24)
        self.hBoxLayout.addWidget(self.iconLabel)
        self.hBoxLayout.addLayout(self.vBoxLayout)
        self.vBoxLayout.setContentsMargins(0, 0, 0, 0)
        self.vBoxLayout.setSpacing(0)
        # name label and install button
        self.vBoxLayout.addLayout(self.topLayout)
        self.topLayout.setContentsMargins(0, 0, 0, 0)
        self.topLayout.addWidget(self.nameLabel)
        # self.topLayout.addWidget(self.installButton, 0, Qt.AlignRight)
        # company label
        self.vBoxLayout.addSpacing(3)
        # self.vBoxLayout.addWidget(self.companyLabel)
        # statistics widgets
        self.vBoxLayout.addSpacing(20)
        self.vBoxLayout.addLayout(self.statisticsLayout)
        self.statisticsLayout.setContentsMargins(0, 0, 0, 0)
        self.statisticsLayout.setSpacing(10)
        self.statisticsLayout.addWidget(self.scoreWidget)
        self.statisticsLayout.addWidget(self.separator)
        self.statisticsLayout.addWidget(self.commentWidget)
        self.statisticsLayout.setAlignment(Qt.AlignLeft)
        # description label
        self.vBoxLayout.addSpacing(20)
        self.vBoxLayout.addWidget(self.descriptionLabel)
        # button
        self.vBoxLayout.addSpacing(12)
        self.buttonLayout.setContentsMargins(0, 0, 0, 0)
        self.vBoxLayout.addLayout(self.buttonLayout)
        # self.buttonLayout.addWidget(self.tagButton, 0, Qt.AlignLeft)
        # self.buttonLayout.addWidget(self.shareButton, 0, Qt.AlignRight)
class DescriptionCard(HeaderCardWidget):
    """ Description card """
    def __init__(self, parent=None):
        super().__init__(parent)
        self.descriptionLabel = BodyLabel(
            '1、窗口透明显示,快捷键快速隐藏窗口,可随意拖动窗口。\n'
            '2、可自定义配置显示字段和字段显示位置排序。\n'
            '3、提供多维度数据分析,可查看实时行情和相关咨询数据。\n'
            '4、具备预警提醒,触发价格预警功能,显示预警框或右下角浮动框实时提醒。',
            self)
        self.descriptionLabel.setWordWrap(True)
        self.viewLayout.addWidget(self.descriptionLabel)
        self.setTitle('功能描述')
class SystemRequirementCard(HeaderCardWidget):
    """ System requirements card """
    def __init__(self, parent=None):
        super().__init__(parent)
        self.setTitle('系统要求')
        self.infoLabel = BodyLabel('此产品适用于win7,win10,win11', self)
        self.successIcon = IconWidget(InfoBarIcon.SUCCESS, self)
        # self.detailButton = HyperlinkLabel('详细信息', self)
        self.vBoxLayout = QVBoxLayout()
        self.hBoxLayout = QHBoxLayout()
        self.successIcon.setFixedSize(16, 16)
        self.hBoxLayout.setSpacing(10)
        self.vBoxLayout.setSpacing(16)
        self.hBoxLayout.setContentsMargins(0, 0, 0, 0)
        self.vBoxLayout.setContentsMargins(0, 0, 0, 0)
        self.hBoxLayout.addWidget(self.successIcon)
        self.hBoxLayout.addWidget(self.infoLabel)
        self.vBoxLayout.addLayout(self.hBoxLayout)
        # self.vBoxLayout.addWidget(self.detailButton)
        self.viewLayout.addLayout(self.vBoxLayout)
class AppInterface(SingleDirectionScrollArea):
    def __init__(self, parent=None):
        super().__init__(parent)
        self.view = QWidget(self)
        self.vBoxLayout = QVBoxLayout(self.view)
        self.appCard = AppInfoCard(self)
        self.descriptionCard = DescriptionCard(self)
        self.systemCard = SystemRequirementCard(self)
        # self.lightBox = LightBox(self)
        # self.lightBox.hide()
        self.setWidget(self.view)
        self.setWidgetResizable(True)
        self.setObjectName("appInterface")
        self.vBoxLayout.setSpacing(10)
        self.vBoxLayout.setContentsMargins(0, 0, 10, 30)
        self.vBoxLayout.addWidget(self.appCard, 0, Qt.AlignTop)
        self.vBoxLayout.addWidget(self.descriptionCard, 0, Qt.AlignTop)
        self.vBoxLayout.addWidget(self.systemCard, 0, Qt.AlignTop)
        self.setStyleSheet("QScrollArea {border: none; background:transparent}")
        self.view.setStyleSheet('QWidget {background:transparent}')
class MainWindow(FluentWindow):
    def __init__(self):
        super().__init__()
        self.initWindow()
        # create sub interface
        self.appInterface = AppInterface(self)
        self.viewInterface = ViewInterface(self)
        self.basicInputInterface = BasicInputInterface(self)
        self.settingInterface = SettingInterface(self)
        # enable acrylic effect
        self.navigationInterface.setAcrylicEnabled(True)
        self.connectSignalToSlot()
        # add items to navigation interface
        self.initNavigation()
        self.splashScreen.finish()
    def connectSignalToSlot(self):
        signalBus.micaEnableChanged.connect(self.setMicaEffectEnabled)
        signalBus.switchToSampleCard.connect(self.switchToSample)
        signalBus.supportSignal.connect(self.onSupport)
    def initNavigation(self):
        # add navigation items
        t = Translator()
        self.addSubInterface(self.appInterface, FluentIcon.HOME, self.tr('软件介绍'))
        self.navigationInterface.addSeparator()
        pos = NavigationItemPosition.SCROLL
        self.addSubInterface(self.viewInterface, Icon.GRID, t.view, pos)
        self.addSubInterface(self.basicInputInterface, FIF.CHECKBOX, t.basicInput, pos)
        # add custom widget to bottom
        self.addSubInterface(
            self.settingInterface, FIF.SETTING, self.tr('Settings'), NavigationItemPosition.BOTTOM)
    def initWindow(self):
        self.resize(840, 620)
        # self.setFixedSize(780, 540)
        self.setWindowIcon(QIcon('app/resource/images/logo.png'))
        self.setWindowTitle('【财运到】股票盯盘软件')
        self.setMicaEffectEnabled(cfg.get(cfg.micaEnabled))
        # create splash screen
        self.splashScreen = SplashScreen(self.windowIcon(), self)
        self.splashScreen.setIconSize(QSize(106, 106))
        self.splashScreen.raise_()
        desktop = QApplication.desktop().availableGeometry()
        w, h = desktop.width(), desktop.height()
        self.move(w // 2 - self.width() // 2, h // 2 - self.height() // 2)
        self.show()
        QApplication.processEvents()
    def onSupport(self):
        language = cfg.get(cfg.language).value
        if language.name() == "zh_CN":
            QDesktopServices.openUrl(QUrl(ZH_SUPPORT_URL))
        else:
            QDesktopServices.openUrl(QUrl(EN_SUPPORT_URL))
    def resizeEvent(self, e):
        super().resizeEvent(e)
        if hasattr(self, 'splashScreen'):
            self.splashScreen.resize(self.size())
    def switchToSample(self, routeKey, index):
        """ switch to sample """
        interfaces = self.findChildren(GalleryInterface)
        for w in interfaces:
            if w.objectName() == routeKey:
                self.stackedWidget.setCurrentWidget(w, False)
                w.scrollToCard(index)
[Python] 纯文本查看 复制代码from PyQt5 import QtWidgets
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QHBoxLayout, QVBoxLayout, QWidget
from qfluentwidgets import CheckBox, SpinBox, SimpleCardWidget
from .gallery_interface import GalleryInterface
from ..common.translator import Translator
class CheckBoxCard(SimpleCardWidget):
    """ App information card """
    def __init__(self, parent=None):
        super().__init__(parent)
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.SimpleCardWidget = SimpleCardWidget()
        self.SimpleCardWidget.setObjectName("SimpleCardWidget")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.SimpleCardWidget)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.CheckBox_1 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_1.setObjectName("CheckBox_1")
        self.gridLayout_2.addWidget(self.CheckBox_1, 0, 0, 1, 1)
        self.SpinBox = SpinBox(self.SimpleCardWidget)
        self.SpinBox.setObjectName("SpinBox")
        self.gridLayout_2.addWidget(self.SpinBox, 0, 1, 1, 1)
        self.CheckBox_2 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_2.setObjectName("CheckBox_2")
        self.gridLayout_2.addWidget(self.CheckBox_2, 0, 2, 1, 1)
        self.SpinBox_2 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_2.setObjectName("SpinBox_2")
        self.gridLayout_2.addWidget(self.SpinBox_2, 0, 3, 1, 1)
        self.CheckBox_3 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_3.setObjectName("CheckBox_3")
        self.gridLayout_2.addWidget(self.CheckBox_3, 0, 4, 1, 1)
        self.SpinBox_3 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_3.setObjectName("SpinBox_3")
        self.gridLayout_2.addWidget(self.SpinBox_3, 0, 5, 1, 1)
        self.CheckBox_4 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_4.setObjectName("CheckBox_4")
        self.gridLayout_2.addWidget(self.CheckBox_4, 1, 0, 1, 1)
        self.SpinBox_4 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_4.setObjectName("SpinBox_4")
        self.gridLayout_2.addWidget(self.SpinBox_4, 1, 1, 1, 1)
        self.CheckBox_5 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_5.setObjectName("CheckBox_5")
        self.gridLayout_2.addWidget(self.CheckBox_5, 1, 2, 1, 1)
        self.SpinBox_5 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_5.setObjectName("SpinBox_5")
        self.gridLayout_2.addWidget(self.SpinBox_5, 1, 3, 1, 1)
        self.CheckBox_6 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_6.setObjectName("CheckBox_6")
        self.gridLayout_2.addWidget(self.CheckBox_6, 1, 4, 1, 1)
        self.SpinBox_6 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_6.setObjectName("SpinBox_6")
        self.gridLayout_2.addWidget(self.SpinBox_6, 1, 5, 1, 1)
        self.CheckBox_7 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_7.setObjectName("CheckBox_7")
        self.gridLayout_2.addWidget(self.CheckBox_7, 2, 0, 1, 1)
        self.SpinBox_7 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_7.setObjectName("SpinBox_7")
        self.gridLayout_2.addWidget(self.SpinBox_7, 2, 1, 1, 1)
        self.CheckBox_8 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_8.setText("")
        self.CheckBox_8.setObjectName("CheckBox_8")
        self.gridLayout_2.addWidget(self.CheckBox_8, 2, 2, 1, 1)
        self.SpinBox_8 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_8.setObjectName("SpinBox_8")
        self.gridLayout_2.addWidget(self.SpinBox_8, 2, 3, 1, 1)
        self.CheckBox_9 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_9.setObjectName("CheckBox_9")
        self.gridLayout_2.addWidget(self.CheckBox_9, 2, 4, 1, 1)
        self.SpinBox_9 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_9.setObjectName("SpinBox_9")
        self.gridLayout_2.addWidget(self.SpinBox_9, 2, 5, 1, 1)
        self.CheckBox_10 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_10.setObjectName("CheckBox_10")
        self.gridLayout_2.addWidget(self.CheckBox_10, 3, 0, 1, 1)
        self.SpinBox_10 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_10.setObjectName("SpinBox_10")
        self.gridLayout_2.addWidget(self.SpinBox_10, 3, 1, 1, 1)
        self.CheckBox_11 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_11.setObjectName("CheckBox_11")
        self.gridLayout_2.addWidget(self.CheckBox_11, 3, 2, 1, 1)
        self.SpinBox_11 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_11.setObjectName("SpinBox_11")
        self.gridLayout_2.addWidget(self.SpinBox_11, 3, 3, 1, 1)
        self.CheckBox_12 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_12.setObjectName("CheckBox_12")
        self.gridLayout_2.addWidget(self.CheckBox_12, 3, 4, 1, 1)
        self.SpinBox_12 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_12.setObjectName("SpinBox_12")
        self.gridLayout_2.addWidget(self.SpinBox_12, 3, 5, 1, 1)
        self.CheckBox_13 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_13.setObjectName("CheckBox_13")
        self.gridLayout_2.addWidget(self.CheckBox_13, 4, 0, 1, 1)
        self.SpinBox_13 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_13.setObjectName("SpinBox_13")
        self.gridLayout_2.addWidget(self.SpinBox_13, 4, 1, 1, 1)
        self.CheckBox_14 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_14.setObjectName("CheckBox_14")
        self.gridLayout_2.addWidget(self.CheckBox_14, 4, 2, 1, 1)
        self.SpinBox_14 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_14.setObjectName("SpinBox_14")
        self.gridLayout_2.addWidget(self.SpinBox_14, 4, 3, 1, 1)
        self.CheckBox_15 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_15.setObjectName("CheckBox_15")
        self.gridLayout_2.addWidget(self.CheckBox_15, 4, 4, 1, 1)
        self.SpinBox_15 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_15.setObjectName("SpinBox_15")
        self.gridLayout_2.addWidget(self.SpinBox_15, 4, 5, 1, 1)
        self.CheckBox_16 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_16.setObjectName("CheckBox_16")
        self.gridLayout_2.addWidget(self.CheckBox_16, 5, 0, 1, 1)
        self.SpinBox_16 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_16.setObjectName("SpinBox_16")
        self.gridLayout_2.addWidget(self.SpinBox_16, 5, 1, 1, 1)
        self.CheckBox_17 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_17.setObjectName("CheckBox_17")
        self.gridLayout_2.addWidget(self.CheckBox_17, 5, 2, 1, 1)
        self.SpinBox_17 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_17.setObjectName("SpinBox_17")
        self.gridLayout_2.addWidget(self.SpinBox_17, 5, 3, 1, 1)
        self.CheckBox_18 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_18.setObjectName("CheckBox_18")
        self.gridLayout_2.addWidget(self.CheckBox_18, 5, 4, 1, 1)
        self.SpinBox_18 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_18.setObjectName("SpinBox_18")
        self.gridLayout_2.addWidget(self.SpinBox_18, 5, 5, 1, 1)
        self.CheckBox_19 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_19.setObjectName("CheckBox_19")
        self.gridLayout_2.addWidget(self.CheckBox_19, 6, 0, 1, 1)
        self.SpinBox_19 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_19.setObjectName("SpinBox_19")
        self.gridLayout_2.addWidget(self.SpinBox_19, 6, 1, 1, 1)
        self.CheckBox_20 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_20.setObjectName("CheckBox_20")
        self.gridLayout_2.addWidget(self.CheckBox_20, 6, 2, 1, 1)
        self.SpinBox_20 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_20.setObjectName("SpinBox_20")
        self.gridLayout_2.addWidget(self.SpinBox_20, 6, 3, 1, 1)
        self.CheckBox_21 = CheckBox(self.SimpleCardWidget)
        self.CheckBox_21.setObjectName("CheckBox_21")
        self.gridLayout_2.addWidget(self.CheckBox_21, 6, 4, 1, 1)
        self.SpinBox_21 = SpinBox(self.SimpleCardWidget)
        self.SpinBox_21.setObjectName("SpinBox_21")
        self.gridLayout_2.addWidget(self.SpinBox_21, 6, 5, 1, 1)
        self.gridLayout.addWidget(self.SimpleCardWidget, 0, 0, 1, 1)
        self.CheckBox_1.setText("股票代码")
        self.CheckBox_2.setText("股票名称")
        self.CheckBox_3.setText("别名")
        self.CheckBox_4.setText("市价")
        self.CheckBox_5.setText("换手率")
        self.CheckBox_6.setText("涨跌幅")
        self.CheckBox_7.setText("涨跌额")
        self.CheckBox_9.setText("别名")
        self.CheckBox_10.setText("代码")
        self.CheckBox_11.setText("名称")
        self.CheckBox_12.setText("别名")
        self.CheckBox_13.setText("代码")
        self.CheckBox_14.setText("名称")
        self.CheckBox_15.setText("别名")
        self.CheckBox_16.setText("代码")
        self.CheckBox_17.setText("名称")
        self.CheckBox_18.setText("别名")
        self.CheckBox_19.setText("代码")
        self.CheckBox_20.setText("名称")
        self.CheckBox_21.setText("别名")
        self.hBoxLayout = QHBoxLayout(self)
        self.vBoxLayout = QVBoxLayout()
        self.topLayout = QHBoxLayout()
        self.statisticsLayout = QHBoxLayout()
        self.buttonLayout = QHBoxLayout()
        self.initLayout()
    def initLayout(self):
        self.hBoxLayout.setSpacing(30)
        self.hBoxLayout.setContentsMargins(34, 24, 24, 24)
        self.hBoxLayout.addLayout(self.gridLayout)
        self.hBoxLayout.addLayout(self.vBoxLayout)
        self.vBoxLayout.setContentsMargins(0, 0, 0, 0)
        self.vBoxLayout.setSpacing(0)
        # name label and install button
        self.vBoxLayout.addLayout(self.topLayout)
        self.topLayout.setContentsMargins(0, 0, 0, 0)
        # self.topLayout.addWidget(self.nameLabel)
        # self.topLayout.addWidget(self.installButton, 0, Qt.AlignRight)
        # company label
        self.vBoxLayout.addSpacing(3)
        # self.vBoxLayout.addWidget(self.companyLabel)
        # statistics widgets
        self.vBoxLayout.addSpacing(20)
        self.vBoxLayout.addLayout(self.statisticsLayout)
        self.statisticsLayout.setContentsMargins(0, 0, 0, 0)
        self.statisticsLayout.setSpacing(10)
        # self.statisticsLayout.addWidget(self.scoreWidget)
        # self.statisticsLayout.addWidget(self.separator)
        # self.statisticsLayout.addWidget(self.commentWidget)
        self.statisticsLayout.setAlignment(Qt.AlignLeft)
        # description label
        self.vBoxLayout.addSpacing(20)
        # self.vBoxLayout.addWidget(self.descriptionLabel)
        # button
        self.vBoxLayout.addSpacing(12)
        self.buttonLayout.setContentsMargins(0, 0, 0, 0)
        self.vBoxLayout.addLayout(self.buttonLayout)
        # self.buttonLayout.addWidget(self.tagButton, 0, Qt.AlignLeft)
        # self.buttonLayout.addWidget(self.shareButton, 0, Qt.AlignRight)
class BasicInputInterface(GalleryInterface):
    """ Basic input interface """
    def __init__(self, parent=None):
        translator = Translator()
        super().__init__(
            title=translator.basicInput,
            subtitle='设置可显示的字段和显示顺序',
            parent=parent
        )
        self.setObjectName('显示字段设置')
        self.view = QWidget(self)
        self.vBoxLayout = QVBoxLayout(self.view)
        self.CheckBoxCard = CheckBoxCard(self)
        self.setWidget(self.view)
        self.setWidgetResizable(True)
        self.vBoxLayout.setSpacing(10)
        self.vBoxLayout.setContentsMargins(0, 0, 10, 30)
        self.vBoxLayout.addWidget(self.CheckBoxCard, 0, Qt.AlignTop)
        self.setStyleSheet("QScrollArea {border: none; background:transparent}")
        self.view.setStyleSheet('QWidget {background:transparent}')
        self.toolBar.saveButton.clicked.connect(self.saveData)
    def saveData(self):
        print('保存数据成功')

别名, 代码

Xbz123   

学习了!正想自己搞一个,看看合适不合适
baiqpl0123   

是来看成品连接的
RainWood   

看起来不够隐蔽啊,想在办公电脑看,有没有隐蔽点的模式
water201   

坐等成品,或者能不能源码打个包?端午节就在家划龙舟了
gdp123gd   

感谢分享,正好拿来用用
gdp123gd   

感觉少东西啊。
opacity   

学习了,感谢大佬分享
uphold   

学习了,感谢大佬分享
RabbitBearLove   

不错的东西
先学习下
谢谢楼主分享
您需要登录后才可以回帖 登录 | 立即注册

返回顶部