CustomQt is a lightweight Python library for PySide6 that enables native-feeling custom titlebars and frameless windows.
It currently supports Windows, with planned support for Linux and macOS.
The goal of CustomQt is to provide a clean, customizable alternative to Qt’s default window chrome—without losing native drag, resize, maximize, shadows, or system behaviors.
- Fully frameless window support
- Accurate native hit-testing (drag, resize, corners)
- Rounded corners with Windows 11 support
- Optional Acrylic blur / Mica effect
- Native handling of maximize / restore / resize states
- Debounced corner updates to reduce flicker
- Customizable titlebar fallback area
- Wayland-compatible client-side decorations
- X11 support using EWMH/NETWM hints
- GNOME/KDE-compatible shadows + resize edges
- macOS vibrancy & blending effects
- Cross-platform custom maximize/minimize buttons
- Unified API across all supported OSes
Install PySide6:
pip install PySide6Import CustomQt (once packaged):
from customqt import WindowsStylerfrom PySide6.QtWidgets import QApplication, QWidget, QPushButton
from customqt import WindowsStyler
app = QApplication([])
window = QWidget()
window.resize(800, 600)
styler = WindowsStyler(
window,
titlebar_fallback=True,
titlebar_fallback_height=30,
border_width=8,
round_corner_radius=15
)
styler.init()
maximize_btn = QPushButton("⬜", window)
styler.setTitlebarMaximizeButton(maximize_btn)
window.show()
app.exec()window: QWidgethittest_callback: Optional[Callable]border_width: int = 8titlebar_fallback: bool = Truetitlebar_fallback_height: int = 30round_corner_radius: int = 15
init()setTitlebarMaximizeButton(button)showMaximized()showNormal()isMaximized() -> boolapply_rounded_corners()enable_acrylic_blur()cleanup()
The Windows implementation uses native APIs such as:
- DWM (shadows, accents, blur)
WM_NCHITTEST(resize/drag)- DPI-aware frame metrics
- Rounded corner policies
Linux support will require:
- Wayland CSD protocols (xdg-decoration, ext-…)
- X11 EWMH hints,
_MOTIF_WM_HINTS,_NET_WMsizing - Handling KDE/Mutter differences
- Qt platform plugin integration
Contributors with Linux WM knowledge are very welcome!
Planned features:
- Vibrancy
- Titlebar blending
- Custom system button areas
- Resize semantics
Contributions are welcome!
Especially from developers experienced in:
- Wayland/X11 window manager internals
- Qt QPA platform plugins
- macOS window management APIs
Feel free to open issues, discussions, or PRs.
MIT License — free for personal and commercial use.