Install & Compatibility
Where this runs
tested against v6.11.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.8s · import 0.000s · 252MB
248MB installed
● package 248MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
QApplication
✓ from PySide6.QtWidgets import QApplication
QWidget
✓ from PySide6.QtWidgets import QWidget
QLabel
✓ from PySide6.QtWidgets import QLabel
QPushButton
✓ from PySide6.QtWidgets import QPushButton
QMainWindow
✓ from PySide6.QtWidgets import QMainWindow
QVBoxLayout
✓ from PySide6.QtWidgets import QVBoxLayout
Qt
✓ from PySide6.QtCore import Qt
QAction
✓ from PySide6.QtGui import QAction
✗ from PySide6.QtWidgets import QAction
QAction moved from QtWidgets to QtGui in PySide6 from PySide2.
A minimal PySide6 application demonstrating how to create a basic window with a label. It initializes QApplication, creates a QWidget as the main window, adds a QLabel, sets a layout, and starts the event loop.
import sys
from PySide6.QtWidgets import QApplication, QLabel, QWidget, QVBoxLayout
def main():
app = QApplication(sys.argv)
window = QWidget()
window.setWindowTitle("PySide6 Essentials App")
layout = QVBoxLayout()
label = QLabel("Hello from PySide6 Essentials!")
layout.addWidget(label)
window.setLayout(layout)
window.show()
sys.exit(app.exec())
if __name__ == "__main__":
main()
Debug
Known issues
breakingWhen migrating from PySide2, the main module name changed from `PySide2` to `PySide6`. All imports must reflect this change.fixUpdate all `from PySide2.<module> import ...` statements to `from PySide6.<module> import ...`.
affects: All versions migrating from PySide2 to PySide6
breakingThe `QAction` class was moved from `PySide6.QtWidgets` to `PySide6.QtGui` in PySide6 compared to PySide2.fixChange `from PySide6.QtWidgets import QAction` to `from PySide6.QtGui import QAction`.
affects: All versions migrating from PySide2 to PySide6
gotchaThe `pos()` and `globalPos()` methods on `QMouseEvent` are deprecated. They now return `QPointF` objects via `position()` and `globalPosition()`.fixReplace `event.pos().x()` with `event.position().x()` and `event.globalPos().x()` with `event.globalPosition().x()`.
affects: PySide6 (from PySide2)
gotchaThe `QLayout.setMargin()` method has been removed. Use `QLayout.setContentsMargins()` instead.fixReplace calls to `layout.setMargin(...)` with `layout.setContentsMargins(left, top, right, bottom)` or `layout.setContentsMargins(QMargins(left, top, right, bottom))`.
affects: PySide6 (from PySide2)
gotchaFor better compatibility with PyQt6 (which enforces fully qualified names), prefer using fully qualified enum names like `Qt.ItemDataRole.DisplayRole` instead of shorter forms like `Qt.DisplayRole`, even though PySide6 supports both.fixUse the full path for enums and flags: e.g., `Qt.AlignmentFlag.AlignLeft` instead of `Qt.AlignLeft`.
affects: PySide6 (especially for cross-library compatibility)
gotchaWhen upgrading PySide6 from versions 6.2.x to 6.3 or newer, issues may arise due to the packaging split into `pyside6-essentials` and `pyside6-addons`. A direct `pip install --upgrade` might not correctly update the dependencies.fixIt is recommended to first `pip uninstall pyside6 pyside6-essentials pyside6-addons shiboken6` and then `pip install pyside6` to ensure a clean installation of the new modular structure.
affects: 6.2.x to 6.3+
gotchaBy default, PySide6 uses `camelCase` for methods and properties, consistent with C++ Qt. To use `snake_case` (PEP8 compliant) and direct property access, you must import them from `__feature__`.fixAdd `from __feature__ import snake_case, true_property` at the top of your Python file to enable these Pythonic conventions.
affects: All PySide6 versions
Upgrade
Version history
6.11.2latest on PyPI · released Aug 18, 2026
Audit
Dependencies
No dependency data recorded yet.