A Windows 11 Fluent Design styled multi-select combo box for PyQt6
Project description
PyQt6 Fluent MultiSelect ComboBox
A beautiful, modern multi-select combo box widget for PyQt6 with Windows 11 Fluent Design styling.
✨ Features
- 🎨 Fluent Design - Windows 11 inspired styling
- 🌙 Dark & Light Themes - Built-in theme support
- ✅ Multi-Select - Select multiple items with checkboxes
- 🔄 Select All - Optional "Select All" functionality
- 🎯 Max Selection - Limit the number of selections
- ⌨️ Keyboard Support - Full keyboard navigation
- 🖱️ Scroll Protection - Mouse wheel won't change selection accidentally
- 🎭 Animations - Smooth arrow rotation animations
- 📦 Zero Dependencies - Only requires PyQt6
📦 Installation
pip install fluent_multiselect
🚀 Quick Start
from PyQt6.QtWidgets import QApplication
from fluent_multiselect import FluentMultiSelectComboBox, Theme
app = QApplication([])
# Create combo box with dark theme
combo = FluentMultiSelectComboBox(theme=Theme.DARK)
# Add items
combo.addItems(["Python", "JavaScript", "TypeScript", "Rust", "Go"])
# Enable "Select All" option
combo.setSelectAllEnabled(True)
# Set placeholder text
combo.setPlaceholderText("Select languages...")
# Connect to selection changes
combo.selectionChanged.connect(lambda items: print(f"Selected: {items}"))
combo.show()
app.exec()
📖 Usage
Basic Usage
from fluent_multiselect import FluentMultiSelectComboBox, Theme
# Create with dark theme (default)
combo = FluentMultiSelectComboBox(theme=Theme.DARK)
# Or light theme
combo = FluentMultiSelectComboBox(theme=Theme.LIGHT)
# Add items
combo.addItem("Item 1")
combo.addItem("Item 2", data="custom_data")
combo.addItems(["Item 3", "Item 4", "Item 5"])
Selection Management
# Get selected items
selected_texts = combo.currentTexts() # ["Item 1", "Item 3"]
selected_data = combo.currentData() # Returns data values
# Set selection by text
combo.setCurrentTexts(["Item 1", "Item 3"])
# Set selection by indexes
combo.setCurrentIndexes([0, 2, 4])
# Select/deselect all
combo.selectAll()
combo.clearSelection()
Configuration
# Enable "Select All" option
combo.setSelectAllEnabled(True, text="Select All")
# Limit maximum selections
combo.setMaxSelectionCount(3)
# Close popup after each selection
combo.setCloseOnSelect(True)
# Custom delimiter for display
combo.setDisplayDelimiter(" | ")
# Placeholder text
combo.setPlaceholderText("Choose options...")
🔧 Requirements
- Python 3.9+
- PyQt6 >= 6.4.0
📄 License
MIT License - see LICENSE file for details.
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
fluent_multiselect-0.1.0.tar.gz
(26.8 kB
view details)
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 fluent_multiselect-0.1.0.tar.gz.
File metadata
- Download URL: fluent_multiselect-0.1.0.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c2d9d8dbcc43f5dc915a57392f97fe34ccb1805047ab1c49578f11adcb5756b
|
|
| MD5 |
46091b5fbbf4ba116c0b9f17b4fdfb00
|
|
| BLAKE2b-256 |
84b4564c8c70a024d1368f3259d05b451897f878060ac29a6bf1f99c48c37989
|
File details
Details for the file fluent_multiselect-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fluent_multiselect-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19a6a4f44a2734c9738c41c8888fb66492d4614c12ea63983ae217c9885ac0f7
|
|
| MD5 |
52a7f485d858fca24528357dd4fd731b
|
|
| BLAKE2b-256 |
48f8c4049bfdfe6bf0b48518e854abb67efe56af1ae63801dc34399231ed1368
|