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


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.12.tar.gz (13.1 kB view details)

Uploaded Source

Built Distributions

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

PySide6_Customized_Window-1.12-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

PySide6_Customized_Window-1.12-py2-none-any.whl (12.9 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: PySide6_Customized_Window-1.12.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for PySide6_Customized_Window-1.12.tar.gz
Algorithm Hash digest
SHA256 5a5e54eda70f738e2f1e032efbcd94af6e7925bf70c596fd9016587a5eda8860
MD5 ff951289e98f3c88a347c600ccda4d21
BLAKE2b-256 15cbe02fc76256036dd1c78bcbb7551948a9a1f6e3820d490b71571decb52be0

See more details on using hashes here.

File details

Details for the file PySide6_Customized_Window-1.12-py3-none-any.whl.

File metadata

File hashes

Hashes for PySide6_Customized_Window-1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 403c3ab962f5bb1719a468f5239b0428c2c91fabdd725d5f3285740f1ad0d3d5
MD5 f7da56266c1817fab463a8b6a07e670f
BLAKE2b-256 a77a95c507fc47b51763c9b53f2fa7bfc30d0050ffdd6c50071a6cec67e86d9f

See more details on using hashes here.

File details

Details for the file PySide6_Customized_Window-1.12-py2-none-any.whl.

File metadata

File hashes

Hashes for PySide6_Customized_Window-1.12-py2-none-any.whl
Algorithm Hash digest
SHA256 86a784d93ab6b5dd95d8ec15bab74eabed61595a02ce91e107215d185005ea28
MD5 91a0f31888c0b3129e9dfb6a78758b05
BLAKE2b-256 bc5a099659d64474e61c0f87b71e6f73899a1a7decd3464b1d083e4c74a8dac8

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