Skip to main content

Lace

Advanced docking system for PySide6 — a feature-rich, themeable widget layout framework for building professional Qt desktop applications in Python.

Version: 0.3.0

PyPI License Publish to PyPI Python Framework


Table of Contents


Features

🪑 Docking & Layout

  • Multi-area docking — Dock widgets to left, right, top, bottom, or center regions within a window
  • Tabbed dock areas — Multiple widgets share a single dock area as tabs, with full tab management (reorder, close, float)
  • Floating windows — Detach any dock widget into its own top-level window; drag it back to dock
  • Drag-and-drop layout — Intuitive resize, re-order, and re-dock via visual drop indicators
  • Nested splitters — Arbitrary nesting of horizontal and vertical split panes
  • Maximize/restore — Expand any dock area to fill its container

📌 Sidebars

  • Auto-hide panels — VS Code-style slide-out sidebars that appear on hover
  • Pinned widgets — Pin dock widgets to sidebars with visual tab buttons
  • Notification badges — Numerical or symbolic badges on sidebar tabs
  • Configurable focus behavior — Choose whether sidebars steal keyboard focus
  • Drag to detach — Tear pinned widgets out of sidebars back into the main layout

🎨 Theming

  • 14 built-in themes — Dark, light, midnight, warm, nordic, monokai, neutral, tokyo_night, catppuccin, dracula, solarized_dark/light, and cyberpunk_neon
  • Declarative ThemeSpec — Define custom themes with color palettes and geometrical tokens (corner radius, border width, title height, tab radius, content margin, etc.)
  • Reactive borders — Active dock area shows a vibrant focus border; inactive areas show a subtle neutral border
  • OS auto-sync — Automatically switch between light/dark themes when the OS changes
  • Custom QSS/stylesheet support — Point themes to external .qss or .css files

⚙️ Configuration

  • 16 global flags — Control tab visibility, button visibility, drag behavior, floating window chrome, icon styling, and more
  • Per-widget feature flags — Granular control over what each dock widget can do: closable, movable, floatable, pinnable
  • Insertion order — Sort "Show View" menu items alphabetically or chronologically
  • Toggle view actions — Integrate dock widget show/hide into menu bars or toolbars as checkable toggles or one-way show buttons

💾 Persistence

  • JSON layout serialization — Save and restore complete window layouts to/from JSON files
  • Perspectives — Save named layout presets (e.g., "Coding Mode", "Presentation Mode") and switch between them instantly
  • Atomic file I/O — Layouts are written atomically (temp file + rename) to prevent corruption

🎯 Icons & Chrome

  • SVG-based icon system — Theme-aware SVG icons with automatic color tinting
  • Custom icon provider — Register a directory of SVG icons for use across tabs and menus
  • Painted chrome — Custom-drawn title bars, tab buttons, splitter handles, and drop indicators with rounded corners and hover states
  • Chromeless floating windows — Optional frameless floating windows that rely entirely on Lace's custom title bar

Quick Start

Installation

pip install pyside6
# Clone Lace
git clone https://github.com/yourusername/lace.git
cd lace

Minimal Example

import sys
from PySide6.QtWidgets import QApplication, QMainWindow, QTextEdit
from lace import DockManager, DockWidget, DockWidgetArea, apply_dock_theme

app = QApplication(sys.argv)
app.setStyle("Fusion")

window = QMainWindow()
window.setWindowTitle("My App")
window.resize(1200, 800)

# Create the dock manager
dock_manager = DockManager(window)
window.setCentralWidget(dock_manager._root)

# Apply a theme
apply_dock_theme("cyberpunk_neon")

# Add a dock widget
editor = DockWidget("Editor", window)
editor.set_widget(QTextEdit())
editor.set_features(DockWidgetFeature.all_features)
dock_manager.add_dock_widget(DockWidgetArea.center, editor)

window.show()
app.exec()

Full Example

Run the demo application to explore all features:

python demo_app.py

The demo includes:

  • Multiple dock widgets with different feature flags (closable, movable, floatable, pinnable)
  • Sidebar setup with notification badges
  • Theme switching menu with 14 built-in themes
  • Global flags menu for live configuration toggling
  • Insertion order control
  • Sidebar focus mode and badge position controls
  • Preset configurations (Default, Minimal, Full)

Screenshots

Screenshots coming soon — add images of your application running with different themes.


Architecture Overview

Lace is built around a clean, modular architecture:

DockManager (facade)
├── DockContainerWidget (root + floating windows)
│   ├── DockSplitter (nested, orientation-aware)
│   └── DockAreaWidget (tabbed regions)
│       ├── DockAreaTitleBar
│       │   └── DockAreaTabBar → DockWidgetTab (×N)
│       └── DockWidget → user content (QTextEdit, QWidget, etc.)
├── SidebarManager (auto-hide panels)
│   ├── SideTabBar → VerticalTabButton (×N)
│   └── SideBarContainer (overlay panel)
├── LayoutSerializer (JSON persistence)
├── DockStyleManager (theme engine)
├── DockThemeBridge (QPalette → Qt children)
└── ThemeManager (OS-aware auto light/dark)

See the Architecture Documentation for a complete module-by-module reference with class hierarchies, signals, and method tables.


Documentation

Document Description
Quick Reference 5-minute guide — installation, common patterns, API lookup
Architecture Complete system architecture — all modules, classes, signals, and data flow
Theming & Geometry ThemeSpec tokens, titlebar flushness, reactive borders, content margin
Enum Mapping Comprehensive mapping of all enumerations and flags with wiring status

Project Structure

lace/
├── lace/                          # Main package
│   ├── dock_manager.py            # Central orchestrator (facade)
│   ├── dock_widget.py             # User-facing dock widget wrapper
│   ├── dock_widget_tab.py         # Painted-chrome tab button
│   ├── dock_container_widget.py   # Root + floating container
│   ├── dock_area_widget.py        # Single tabbed region
│   ├── dock_splitter.py           # Nested splitters + resize handles
│   ├── floating_dock_container.py # Top-level floating window
│   ├── dock_overlay.py            # Drop-target visual overlays
│   ├── dock_chrome.py             # Drag detector, chrome buttons, frames
│   ├── dock_paint.py              # Painting primitives
│   ├── dock_theme.py              # Theme schemas, ThemeSpec, color math
│   ├── dock_custom_theme.py       # 14 built-in theme presets
│   ├── dock_style_manager.py      # Singleton style manager (subscriber model)
│   ├── dock_theme_bridge.py       # QPalette push to Qt children
│   ├── theme_manager.py           # OS-aware auto dark/light switching
│   ├── layout_serializer.py       # JSON save/restore, perspectives
│   ├── dock_container_state.py    # Low-level tree state save/restore
│   ├── dock_signals.py            # Internal event bus
│   ├── dock_menu.py               # Unified context menu system
│   ├── dock_styled.py             # DockStyled mixin (auto-style registration)
│   ├── dock_icon_provider.py      # SVG icon provider with tinting
│   ├── sidebar_manager.py         # Auto-hide sidebar controller
│   ├── sidebar_tab.py             # Vertical tab button
│   ├── sidebar_tab_bar.py         # Vertical tab strip
│   ├── sidebar_container.py       # Animated overlay panel
│   ├── sidebar_title_bar.py       # Title bar inside overlay panel
│   ├── sidebar_state.py           # Sidebar state compatibility shim
│   ├── eliding_label.py           # QLabel with text elision
│   ├── enums.py                   # All enumerations and flags
│   ├── util.py                    # Utility functions
│   └── _trace.py                  # Optional debug tracing
├── demo_app.py                    # Full-featured demo application
├── dev_smoke/                     # Smoke tests for individual features
├── docs/                          # Documentation
├── lace/resources/lace_icons/     # SVG icons (close, dock, float, pin, etc.)
├── LICENSE                        # Apache-2.0
└── README.md                      # This file

Contributing

Contributions are welcome! Please:

  1. Open an issue to discuss significant changes before starting work
  2. Follow the existing code style and naming conventions
  3. Add smoke tests in dev_smoke/ for new features
  4. Update documentation (docs/) for user-facing changes

License

Lace is licensed under the Apache License 2.0. See LICENSE for details.

This project incorporates components from qtpydocking under the BSD 3-Clause License. See LICENSE for full attribution.


Author: opticsWolf
Contact: opticswolf@protonmail.com

Metadata

Release files for lace-dock 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lace-dock 0.3.0
File Size Uploaded
lace_dock-0.3.0.tar.gz 135.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lace-dock 0.3.0
File Interpreter ABI Platform
lace_dock-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 293.9 kB

Release files / lace_dock-0.3.0.tar.gz

Download URL lace_dock-0.3.0.tar.gz
Size 135.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d73a30d33decb7e99906fbbcf2ec1c1084fe5ca9d346ed7b05eea7c5a632ead8
BLAKE2b-256 checksum
How to use checksums
7ad6fda4878381caa42f83c9d5945c931b49800687e51d66f9fbb72238c45568
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / lace_dock-0.3.0-py3-none-any.whl

Download URL lace_dock-0.3.0-py3-none-any.whl
Size 158.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11bd5ecf38183630ff4b785aef4ae468cdbf1eee3d2583dad4275584cdd78045
BLAKE2b-256 checksum
How to use checksums
a449795c73d8d5fd47199da96a8df50eb30a29e7c4dba4c012c368f5ebbc9c2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release history Release notifications | RSS feed

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.0

2 release files

0.6.5

2 release files

0.5.0

2 release files

0.4.5

2 release files

0.4.0

2 release files

This release

0.3.0 This release

2 release files

0.2.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page