A customized window based on PySide1.
Project description
PySide1-Customized-Window
简介 Introduction
本Python模块是PySideX-Customized-Window的PySide1分支,允许用户创建自定义非客户区窗口,非客户区使用PySide1绘制,支持移动、最小化、最大化、贴边自动布局、背景模糊等功能。只支持Windows、ReactOS、Wine平台。
This Python module is the PySide1 branch of PySideX-Customized-Window, allows users to create windows with customized non-client area which are drawn with PySide1, support moving, minimizing, maximizing, auto-layout of borders, background blurring, etc. It only supports Windows, ReactOS and Wine.
安装命令 Installation command
python -m pip install PySide1-Customized-Window
示例代码 Example code
# -*- coding: utf-8 -*-
import sys
from PySide.QtGui import *
from PySide.QtCore import *
from PySide1_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
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
File details
Details for the file PySide1_Customized_Window-1.12.tar.gz
.
File metadata
- Download URL: PySide1_Customized_Window-1.12.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13cadad4c15fd34a08d679557fb3f9a48d1ded8fabe4c4689de6bd2a2ce02985 |
|
MD5 | 365c704a083769f2c661b2a166c40751 |
|
BLAKE2b-256 | 6ee4e853324d55da6cbc3c29d8cfb6ee79a6c20296223a855cf9e7bced2c6f56 |
File details
Details for the file PySide1_Customized_Window-1.12-py3-none-any.whl
.
File metadata
- Download URL: PySide1_Customized_Window-1.12-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb9017a59d25ec1a9fada34e94acd7fa0a0b531c84dbb52e7692cc2f92004111 |
|
MD5 | 50ed94ab74190afbca11cf65a4a7e288 |
|
BLAKE2b-256 | 302d6d71a66320b020ac2bc0fd48fb82294d80c65723547c53159ebe364e37b9 |
File details
Details for the file PySide1_Customized_Window-1.12-py2-none-any.whl
.
File metadata
- Download URL: PySide1_Customized_Window-1.12-py2-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70d6f3e87cf97b446f0013e1444cb56e7500320bea65639f8ad831a0d68b8e66 |
|
MD5 | 4bc6fbe36450c8f16a9626fccd243433 |
|
BLAKE2b-256 | 08ae92c6dce000ae1544b77f037c25b1d3d49e2ef82d9abaab9bbe519663b126 |