A customized window based on PySideX.
Project description
PySideX-Customized-Window
简介 Introduction
本Python模块是一个基于PySideX的界面模块,允许用户创建自定义非客户区窗口,非客户区使用PySideX绘制,支持移动、最小化、最大化、贴边自动布局、背景模糊等功能,分为3个版本:PySide1-Customized-Window、PySide2-Customized-Window、PySide6-Customized-Window,分别对应PySide1/PySide2/PySide6。只支持Windows、ReactOS、Wine平台。
This Python module is a PySideX-based interface module that allows users to create windows with customized non-client area, which are drawn using PySideX, support moving, minimizing, maximizing, auto-layout of borders, background blurring, etc. There are 3 branches: PySide1-Customized-Window, PySide2- Customized-Window, PySide6-Customized-Window, which correspond to PySide1/PySide2/PySide6 respectively. It only supports Windows, ReactOS and Wine.
安装命令 Installation command
python -m pip install PySide1-Customized-Window
python -m pip install PySide2-Customized-Window
python -m pip install PySide6-Customized-Window
示例代码 Example code
# -*- coding: utf-8 -*-
import sys
#from PySide2 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()
window.setWindowTitle('Window')
window.setDarkTheme(2)
window.resize(int(400.0 * window.dpi / 96.0), int(175.0 * window.dpi / 96.0))
window.setWindowIcon(QIcon('Icon.ico'))
button = QPushButton('Button', window.clientArea)
window.show()
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 Distributions
Built Distributions
Hashes for PySide6_Customized_Window-1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f2da37709c276f1e32f12f2b50339a302b833d6a1258708de308cdf69d70ef2 |
|
MD5 | 6b3f8cb3e35f4adb05a1c9907464a98f |
|
BLAKE2b-256 | 569cb0d1aa7316b0df1746985ff5aeedc1f0b53ccc2352e9bd5f691416fa8e86 |
Hashes for PySide6_Customized_Window-1.4-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c831809d82a327b17e893ae092fde1b148d6bcd399a3d3b75df6088fa29e495 |
|
MD5 | cd45c2cdd80e28c93035730eef8cd60c |
|
BLAKE2b-256 | 506de0fc011e46e63b3a032071981c27195bf6906ce2bdf1df140a5094756e40 |