A customized window based on PySide6.
Project description
PySide6-Customized-Window
简介 Introduction
本Python模块是PySideX-Customized-Window的PySide6分支,允许用户创建自定义非客户区窗口,非客户区使用PySide6绘制,支持移动、最小化、最大化、贴边自动布局、背景模糊等功能。只支持Windows、ReactOS、Wine平台。
This Python module is the PySide6 branch of PySideX-Customized-Window, allows users to create windows with customized non-client area which are drawn with PySide6, support moving, minimizing, maximizing, auto-layout of borders, background blurring, etc. It only supports Windows, ReactOS and Wine.
安装命令 Installation command
python -m pip install PySide6-Customized-Window
示例代码 Example code
# -*- coding: utf-8 -*-
import sys
from PySide6.QtWidgets import *
from PySide6.QtGui import *
from PySide6.QtCore import *
from PySide6_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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Close
Hashes for PySide6_Customized_Window-1.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a5e54eda70f738e2f1e032efbcd94af6e7925bf70c596fd9016587a5eda8860 |
|
MD5 | ff951289e98f3c88a347c600ccda4d21 |
|
BLAKE2b-256 | 15cbe02fc76256036dd1c78bcbb7551948a9a1f6e3820d490b71571decb52be0 |
Close
Hashes for PySide6_Customized_Window-1.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 403c3ab962f5bb1719a468f5239b0428c2c91fabdd725d5f3285740f1ad0d3d5 |
|
MD5 | f7da56266c1817fab463a8b6a07e670f |
|
BLAKE2b-256 | a77a95c507fc47b51763c9b53f2fa7bfc30d0050ffdd6c50071a6cec67e86d9f |
Close
Hashes for PySide6_Customized_Window-1.12-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86a784d93ab6b5dd95d8ec15bab74eabed61595a02ce91e107215d185005ea28 |
|
MD5 | 91a0f31888c0b3129e9dfb6a78758b05 |
|
BLAKE2b-256 | bc5a099659d64474e61c0f87b71e6f73899a1a7decd3464b1d083e4c74a8dac8 |