A Custom Titlebar Handler for pyqt5
Project description
Custom Title Bar Handler
This tool simplifies the process of managing custom title bars, including functionality for window movement, minimizing, and closing. It is especially useful for applications that use custom-designed UI elements instead of the default OS-provided title bars and buttons.
Features
Custom Title Bar Movement: Easily implement custom title bar dragging.
Minimize Button: Add functionality for minimizing your application window.
Close Button: Add functionality for closing your application window.
Installation
To use this tool, simply include it in your project. There is no need for additional dependencies beyond your current setup.
Usage
Here’s a simple example of how to use the tool:
title_bar_handler(
form=Form, # The main window or form of the application
titlebar=self.titlebar, # The custom title bar element
close_button=self.exit_button, # The custom close button
minimise_button=self.mini_button # The custom minimize button
)
Parameters
form: The main window or form object you want to control.
titlebar: The custom UI element acting as your title bar. This allows dragging and moving the window.
close_button: The button that will handle the window's close action.
minimise_button: The button that will handle minimizing the window.
Example
from your_module import title_bar_handler
# Assuming Form is your main application window class
# and you have created custom widgets for titlebar, exit_button, and mini_button
title_bar_handler(
form=Form,
titlebar=self.titlebar,
close_button=self.exit_button,
minimise_button=self.mini_button
)
This will ensure that your custom title bar and buttons work just like a standard window's controls, but with your own design.
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qttitlebarmanager-0.1.0.tar.gz.
File metadata
- Download URL: qttitlebarmanager-0.1.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3384231fc0902e84edd54b817737eae5da65268473a0f123c55eefc5558d6c6e
|
|
| MD5 |
80b418004cd823d3ec8e3e4bedcfd7cf
|
|
| BLAKE2b-256 |
a50952e950a65b84ae4f71d03fcfaecb6013e9e40775f07a3812d92faca8362b
|
File details
Details for the file qttitlebarmanager-0.1.0-py3-none-any.whl.
File metadata
- Download URL: qttitlebarmanager-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08ea5961b2d9635b063346461281a1e261825462bcedc7ea013dfc3416b1a51e
|
|
| MD5 |
37417d944b35047aaac225da79cdff0a
|
|
| BLAKE2b-256 |
a5bc48a789835c0c341086aae2d8652c27b1852da2aa550cf90f2c3fd66689dc
|