Skip to main content

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)
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PySide6_Customized_Window-1.17.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PySide6_Customized_Window-1.17-py2.py3-none-any.whl (14.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file PySide6_Customized_Window-1.17.tar.gz.

File metadata

File hashes

Hashes for PySide6_Customized_Window-1.17.tar.gz
Algorithm Hash digest
SHA256 404ce5b749640decd725cc9e06b31425f6a1f8fa38032618ac6679f96cfbe33c
MD5 22454fe26a8d4e687ce0f9e377fedcaa
BLAKE2b-256 19dfa37eb7bea2c80bd87cbe8167ae15c6a21e8e9ab47c233355d019a7ec05f5

See more details on using hashes here.

File details

Details for the file PySide6_Customized_Window-1.17-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for PySide6_Customized_Window-1.17-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ea606ac39cdf8b904a5a624f6116ee7b5e8b4d6465e01cc6154497d5e0c713b3
MD5 da30afdfdb1e27cb6e12517bb5eb5c37
BLAKE2b-256 133a95556e60ca1fb18d4e3055a8569a09965b39389ee347325eaa65a6bf4911

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page