PySide2-Customized-Window


NamePySide2-Customized-Window JSON
Version 1.15 PyPI version JSON
download
home_pagehttps://yuzhouren86.github.io
SummaryA customized window based on PySide2.
upload_time2024-02-08 07:21:02
maintainer
docs_urlNone
authorYuZhouRen86
requires_python>=2.6
license
keywords python gui pyside
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## PySide2-Customized-Window
### 简介 Introduction
本Python模块是PySideX-Customized-Window的PySide2分支,允许用户创建自定义非客户区窗口,非客户区使用PySide2绘制,支持移动、最小化、最大化、贴边自动布局、背景模糊等功能。只支持Windows、ReactOS、Wine平台。
<br>
This Python module is the PySide2 branch of PySideX-Customized-Window, allows users to create windows with customized non-client area which are drawn with PySide2, support moving, minimizing, maximizing, auto-layout of borders, background blurring, etc. It only supports Windows, ReactOS and Wine.
### 安装命令 Installation command
*`python -m pip install PySide2-Customized-Window`*
### 示例代码 Example code
```
# -*- coding: utf-8 -*-
import sys
from PySide2.QtWidgets import *
from PySide2.QtGui import *
from PySide2.QtCore 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()
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_()
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://yuzhouren86.github.io",
    "name": "PySide2-Customized-Window",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=2.6",
    "maintainer_email": "",
    "keywords": "Python GUI PySide",
    "author": "YuZhouRen86",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/1f/11/363b306d4d8a500fb49db9b20a0860100681b573d180fbfcb8336d5bc4a4/PySide2_Customized_Window-1.15.tar.gz",
    "platform": null,
    "description": "## PySide2-Customized-Window\n### \u7b80\u4ecb Introduction\n\u672cPython\u6a21\u5757\u662fPySideX-Customized-Window\u7684PySide2\u5206\u652f\uff0c\u5141\u8bb8\u7528\u6237\u521b\u5efa\u81ea\u5b9a\u4e49\u975e\u5ba2\u6237\u533a\u7a97\u53e3\uff0c\u975e\u5ba2\u6237\u533a\u4f7f\u7528PySide2\u7ed8\u5236\uff0c\u652f\u6301\u79fb\u52a8\u3001\u6700\u5c0f\u5316\u3001\u6700\u5927\u5316\u3001\u8d34\u8fb9\u81ea\u52a8\u5e03\u5c40\u3001\u80cc\u666f\u6a21\u7cca\u7b49\u529f\u80fd\u3002\u53ea\u652f\u6301Windows\u3001ReactOS\u3001Wine\u5e73\u53f0\u3002\n<br>\nThis Python module is the PySide2 branch of PySideX-Customized-Window, allows users to create windows with customized non-client area which are drawn with PySide2, support moving, minimizing, maximizing, auto-layout of borders, background blurring, etc. It only supports Windows, ReactOS and Wine.\n### \u5b89\u88c5\u547d\u4ee4 Installation command\n*`python -m pip install PySide2-Customized-Window`*\n### \u793a\u4f8b\u4ee3\u7801 Example code\n```\n# -*- coding: utf-8 -*-\nimport sys\nfrom PySide2.QtWidgets import *\nfrom PySide2.QtGui import *\nfrom PySide2.QtCore import *\nfrom PySide2_Customized_Window import *\n#class MyWindow(BlurWindow):\nclass MyWindow(CustomizedWindow):\n    def __init__(self):\n        super(MyWindow, self).__init__()\n    def MessageHandler(self, hwnd, message, wParam, lParam):\n        print(hwnd, message, wParam, lParam)\nQApplication.setHighDpiScaleFactorRoundingPolicy(Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)\nQApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)\nQApplication.setAttribute(Qt.AA_UseHighDpiPixmaps, True)\napp = QApplication(sys.argv)\nwindow = MyWindow()\nlist(map(window.setTitleTextColour, [QColor(0, 0, 139), QColor(119, 235, 255)], [1, 2], [1] * 2))\nlist(map(window.setMenuButtonColour, [QColor(0, 0, 139), QColor(119, 235, 255)], [1, 2], [1] * 2))\nwindow.setWindowTitle('Window')\nwindow.setDarkTheme(2)\nwindow.setWindowIcon(QIcon('Icon.ico'))\nsplashscreen = window.splashScreen()\nsplashscreen.show()\nwindow.resize(*window.getWindowSizeByClientSize([int(400 * window.dpi() / 96.0), int(175 * window.dpi() / 96.0)]))\nbutton = QPushButton('Button', window.clientArea)\nwindow.show()\nsplashscreen.finish(window)\napp.exec_()\n```\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A customized window based on PySide2.",
    "version": "1.15",
    "project_urls": {
        "Homepage": "https://yuzhouren86.github.io"
    },
    "split_keywords": [
        "python",
        "gui",
        "pyside"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "44efb5d47c62917e5126aa5b7deb05348f34bbae631accf475c7ca5ca4bc329c",
                "md5": "eeedab04c7fb6727ac4e4edfddb4e964",
                "sha256": "ca2febc48f60f9801c25f3d9736e9e3f90053a0877c9cd14e6dd29ac3d3e2c01"
            },
            "downloads": -1,
            "filename": "PySide2_Customized_Window-1.15-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eeedab04c7fb6727ac4e4edfddb4e964",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=2.6",
            "size": 14533,
            "upload_time": "2024-02-08T07:21:00",
            "upload_time_iso_8601": "2024-02-08T07:21:00.659460Z",
            "url": "https://files.pythonhosted.org/packages/44/ef/b5d47c62917e5126aa5b7deb05348f34bbae631accf475c7ca5ca4bc329c/PySide2_Customized_Window-1.15-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f11363b306d4d8a500fb49db9b20a0860100681b573d180fbfcb8336d5bc4a4",
                "md5": "352d92dc0406e2282bbc9512b4f10101",
                "sha256": "7b57c24efaf2bdc4f703b26952c2b2a2cf4e0dad3ff0888453445d204cc6e924"
            },
            "downloads": -1,
            "filename": "PySide2_Customized_Window-1.15.tar.gz",
            "has_sig": false,
            "md5_digest": "352d92dc0406e2282bbc9512b4f10101",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.6",
            "size": 14748,
            "upload_time": "2024-02-08T07:21:02",
            "upload_time_iso_8601": "2024-02-08T07:21:02.661306Z",
            "url": "https://files.pythonhosted.org/packages/1f/11/363b306d4d8a500fb49db9b20a0860100681b573d180fbfcb8336d5bc4a4/PySide2_Customized_Window-1.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-08 07:21:02",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pyside2-customized-window"
}
        
Elapsed time: 0.18734s