Skip to main content

PySide2-Customized-Window

简介 Introduction

本Python模块是PySideX-Customized-Window的PySide2分支,允许用户创建自定义非客户区窗口,非客户区使用PySide2绘制,支持移动、最小化、最大化、贴边自动布局、背景模糊等功能。只支持Windows、ReactOS、Wine平台。
This Python module is the PySide2 branch of PySideX-Customized-Window, allows users to create windows with customized non-client area which are drawn with PySide2, support moving, minimizing, maximizing, auto-layout of borders, background blurring, etc. It only supports Windows, ReactOS and Wine.

安装命令 Installation command

python -m pip install PySide2-Customized-Window

示例代码 Example code

# -*- coding: utf-8 -*-
import sys
from PySide2.QtWidgets import *
from PySide2.QtGui import *
from PySide2.QtCore import *
from PySide2_Customized_Window import *
#class MyWindow(BlurWindow):
class MyWindow(CustomizedWindow):
    def __init__(self):
        super(MyWindow, self).__init__()
    def MessageHandler(self, hwnd, message, wParam, lParam):
        print(hwnd, message, wParam, lParam)
QApplication.setHighDpiScaleFactorRoundingPolicy(Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
app = QApplication(sys.argv)
window = MyWindow()
list(map(window.setTitleTextColour, [QColor(0, 0, 139), QColor(119, 235, 255)], [1, 2], [1] * 2))
list(map(window.setMenuButtonColour, [QColor(0, 0, 139), QColor(119, 235, 255)], [1, 2], [1] * 2))
window.setWindowTitle('Window')
window.setDarkTheme(2)
window.setWindowIcon(QIcon('Icon.ico'))
splashscreen = window.splashScreen()
splashscreen.show()
window.resize(*window.getWindowSizeByClientSize([int(400 * window.dpi() / 96.0), int(175 * window.dpi() / 96.0)]))
button = QPushButton('Button', window.clientArea)
window.show()
splashscreen.finish(window)
app.exec_()

Release files for PySide2-Customized-Window 1.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PySide2-Customized-Window 1.17
File Size Uploaded
PySide2_Customized_Window-1.17.tar.gz 15.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PySide2-Customized-Window 1.17
File Interpreter ABI Platform
PySide2_Customized_Window-1.17-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 30.3 kB

Release files / PySide2_Customized_Window-1.17.tar.gz

Download URL PySide2_Customized_Window-1.17.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9c9cdf9cc2cae7eb68fb2bfc3421b962c8f661ec3e98a7bd965bcb76d3280116
BLAKE2b-256 checksum
How to use checksums
20a515e0cb61d9f9749a6b63392297266a6ccc095bf0b875bce3037d61f8aa79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / PySide2_Customized_Window-1.17-py2.py3-none-any.whl

Download URL PySide2_Customized_Window-1.17-py2.py3-none-any.whl
Size 15.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8376d892a21df01fe8aa003ae83cba306b30f5cb22a1aebfdac60caa04bfbb84
BLAKE2b-256 checksum
How to use checksums
89e99b15ea20b16a208dd2440bec140c2026ce1c4d1e9b1904e6a2f03bd9c3c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.17 This release

2 release files

1.16

2 release files

1.15

2 release files

1.12

3 release files

1.11

3 release files

1.10

2 release files

1.9

2 release files

1.8

2 release files

1.7

2 release files

1.6

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page