A lightweight Windows Taskbar integration library for PySide6 applications using the native Windows ITaskbarList3 COM API.
iTaskbar3 allows PySide6 applications to control the Windows Taskbar progress indicator and display overlay icons for different application states such as downloading, paused, error, and completed.
- Native Windows
ITaskbarList3support - Taskbar progress bar
- Five Windows Taskbar progress states:
TBPF.NO_PROGRESSTBPF.INDETERMINATETBPF.NORMALTBPF.ERRORTBPF.PAUSED
- Taskbar overlay icons
- Downloading state
- Paused state
- Error state
- Completed state
- Loading / indeterminate state
- Progress value and maximum value support
- Automatic COM initialization and cleanup
- Native Windows
HWNDsupport through PySide6 - No additional Python package required for the Taskbar API
- Lightweight
ctypesimplementation
- Windows 10 or Windows 11
- Python 3.10+
- PySide6
- A Windows desktop environment
iTaskbar3/
β
βββ iTaskbar3.py
βββ iTaskbar3_Example.py
β
βββ resources/
βββ downloading.ico
βββ paused.ico
βββ error.ico
βββ completed.ico
Install PySide6:
pip install PySide6If you are using uv:
uv add PySide6No additional package is required for ITaskbarList3.
Import the Taskbar class:
from taskbar import ITaskbarList3, TBPFGet the native Windows window handle from PySide6:
hwnd = int(self.winId())
self.taskbar = ITaskbarList3(hwnd)self.taskbar.set_state(TBPF.NORMAL)
self.taskbar.set_progress(50, 100)The Windows Taskbar will display approximately 50% progress.
Use this when the application is busy but the exact progress is unknown:
self.taskbar.set_state(TBPF.INDETERMINATE)This is useful for operations such as:
- Loading
- Fetching metadata
- Connecting
- Preparing
- Processing
self.taskbar.set_state(TBPF.PAUSED)
self.taskbar.set_progress(50, 100)self.taskbar.set_state(TBPF.ERROR)
self.taskbar.set_progress(50, 100)self.taskbar.set_state(TBPF.NO_PROGRESS)or:
self.taskbar.clear_progress()ITaskbarList3 can display a small overlay icon on the application's Taskbar icon.
self.taskbar.set_overlay_icon(
"resources/downloading.ico",
"Downloading"
)self.taskbar.set_overlay_icon(
"resources/paused.ico",
"Paused"
)self.taskbar.set_overlay_icon(
"resources/error.ico",
"Error"
)self.taskbar.set_overlay_icon(
"resources/completed.ico",
"Completed"
)self.taskbar.clear_overlay_icon()iTaskbar3 provides higher-level helper methods for common application states.
self.taskbar.downloading(
72,
100,
"resources/downloading.ico"
)self.taskbar.paused(
72,
100,
"resources/paused.ico"
)self.taskbar.error(
72,
100,
"resources/error.ico"
)self.taskbar.indeterminate(
"resources/downloading.ico"
)self.taskbar.completed(
"resources/completed.ico"
)self.taskbar.reset()A downloader application can use the following state flow:
ββββββββββββββββ
β Loading β
β INDETERMINATEβ
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββ
β Downloading β
β NORMAL β
βββββ¬βββββββ¬ββββ
β β
Pause β β Error
βΌ βΌ
ββββββββββ βββββββββ
β Paused β β Error β
βββββ¬βββββ βββββββββ
β
β Resume
βΌ
βββββββββββββββ
β Downloading β
ββββββββ¬βββββββ
β
β Complete
βΌ
βββββββββββββββ
β Completed β
β β Overlay β
βββββββββββββββ
| State | Value | Description |
|---|---|---|
TBPF.NO_PROGRESS |
0x00 |
Hide the progress indicator |
TBPF.INDETERMINATE |
0x01 |
Progress is unknown |
TBPF.NORMAL |
0x02 |
Normal progress |
TBPF.ERROR |
0x04 |
Error state |
TBPF.PAUSED |
0x08 |
Paused state |
There is no dedicated TBPF.COMPLETED state. A completed operation can use:
self.taskbar.set_state(TBPF.NO_PROGRESS)
self.taskbar.set_overlay_icon(
"resources/completed.ico",
"Completed"
)Recommended overlay icon sizes:
16 Γ 16
20 Γ 20
24 Γ 24
32 Γ 32
ICO files are recommended because Windows can select an appropriate icon size for the Taskbar.
Example:
resources/
βββ downloading.ico
βββ paused.ico
βββ error.ico
βββ completed.ico
Release the Taskbar COM object when the application closes:
def closeEvent(self, event):
self.taskbar.close()
super().closeEvent(event)The implementation also provides automatic cleanup through the destructor.
iTaskbar3 uses Python's built-in ctypes module to access the Windows COM interface directly.
This keeps the project lightweight and avoids requiring a separate Windows Taskbar wrapper package.
iTaskbar3
The name refers to the Windows ITaskbarList3 interface used by this project.
iTaskbar3 is specifically designed for:
Windows 10
Windows 11
It is not intended to provide Linux or macOS Taskbar/Dock APIs.
This project is licensed under the MIT License - see the LICENSE file for details.
Developed with β€οΈ by YawHackka
- QT6 - The Foundation Framework
- Pyside6 - Python Bindings for Qt
- IconArchive - A Resource for Icons
Made with π by YawHackka
