7 Star 30 Fork 19

shiyindebcd/进程交易者

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Donation_Inheritance.py 2.83 KB
一键复制 编辑 原始数据 按行查看 历史
shiyindebcd 提交于 2022-09-27 03:16 . 深色和浅色主题已经完美
# -*- coding: utf-8 -*-
from PySide6 import QtCore
from PySide6.QtGui import QCursor, Qt
from PySide6.QtWidgets import (QWidget)
from UI.Donation_dark import Ui_Form as UI_dark
from UI.Donation_light import Ui_Form as UI_light
from main import THEME
if THEME == "dark":
UI = UI_dark
else:
UI = UI_light
class Donation(QWidget, UI): # 捐赠窗口类
def __init__(self):
super(Donation, self).__init__()
self.setupUi(self)
# 不显示标题栏
flags = QtCore.Qt.WindowFlags(Qt.FramelessWindowHint)
self.setWindowFlags(flags)
# 不显示空白边框
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
# 设置透明度
self.setWindowOpacity(0.95)
self.label_5.setText('本项目github地址: https://github.com/shiyindebcd/ProcessTrader <a href="https://github.com/shiyindebcd/ProcessTrader"> 点击跳转</a>')
self.label_5.setOpenExternalLinks(True) # 使其成为超链接
self.label_5.setTextInteractionFlags(Qt.TextBrowserInteraction)
self.label_6.setText('本项目gitee地址: https://gitee.com/shiyindebcd/ProcessTrader <a href="https://gitee.com/shiyindebcd/ProcessTrader"> 点击跳转</a>')
self.label_6.setOpenExternalLinks(True)
self.label_6.setTextInteractionFlags(Qt.TextBrowserInteraction)
self.label_7.setText('B站软件用法详细解说地址: https://www.bilibili.com <a href="https://www.bilibili.com/video/BV1tY4y177sv?share_source=copy_web&vd_source=0f0ae5e8365c85cd112830a14d80cef6"> 点击跳转</a>')
self.label_7.setOpenExternalLinks(True)
self.label_7.setTextInteractionFlags(Qt.TextBrowserInteraction)
self.label_8.setText('YouTube软件详细解说地址: https://www.youtube.com <a href="https://www.youtube.com"> 点击跳转</a>')
self.label_8.setOpenExternalLinks(True)
self.label_8.setTextInteractionFlags(Qt.TextBrowserInteraction)
self.label_9.setTextInteractionFlags(Qt.TextBrowserInteraction)
self.label_10.setTextInteractionFlags(Qt.TextBrowserInteraction)
self.label_11.setTextInteractionFlags(Qt.TextBrowserInteraction)
def mousePressEvent(self, e): # 鼠标点击事件
if e.button() == Qt.LeftButton:
self.m_drag = True
self.m_DragPosition = e.globalPosition().toPoint() - self.pos()
e.accept()
self.setCursor(QCursor(Qt.OpenHandCursor))
def mouseReleaseEvent(self, e): # 鼠标释放事件
if e.button() == Qt.LeftButton:
self.m_drag = False
self.setCursor(QCursor(Qt.ArrowCursor))
def mouseMoveEvent(self, e): # 鼠标拖动事件
if Qt.LeftButton and self.m_drag:
self.move(e.globalPosition().toPoint() - self.m_DragPosition)
e.accept()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/shiyindebcd/ProcessTrader.git
[email protected]:shiyindebcd/ProcessTrader.git
shiyindebcd
ProcessTrader
进程交易者
进程交易者2.0

搜索帮助