# Qt Modern Style

A modern, clean, and professional Qt stylesheet with icons for PyQt5/PyQt6/PySide2/PySide6 applications.

![Python Version](https://img.shields.io/badge/python-3.8%2B-blue)
![License](https://img.shields.io/badge/license-MIT-green)

## Features

- 🎨 **Modern Light Theme** - Clean, corporate-style appearance
- 🖼️ **500+ SVG Icons** - Comprehensive icon library included
- 🔧 **Easy Integration** - One-line setup for any Qt application
- 🔄 **Cross-Platform** - Works with PyQt5, PyQt6, PySide2, and PySide6
- 📦 **Zero Dependencies** - No external dependencies required

## Installation

```bash
pip install qt-modern-style
```

### With Qt binding (optional):

```bash
# For PyQt5
pip install qt-modern-style[pyqt5]

# For PyQt6
pip install qt-modern-style[pyqt6]

# For PySide2
pip install qt-modern-style[pyside2]

# For PySide6
pip install qt-modern-style[pyside6]
```

## Quick Start

### Basic Usage

```python
from PyQt5.QtWidgets import QApplication, QMainWindow
import qt_modern_style

app = QApplication([])

# Apply the modern style to your application
qt_modern_style.apply(app)

window = QMainWindow()
window.setWindowTitle("My Modern App")
window.show()

app.exec_()
```

### Using Icons

```python
from PyQt5.QtWidgets import QApplication, QPushButton
from PyQt5.QtGui import QIcon
import qt_modern_style

app = QApplication([])
qt_modern_style.apply(app)

# Load icons from the package
button = QPushButton()
button.setIcon(qt_modern_style.get_icon("settings"))  # or "gear", "save", "close", etc.
button.show()

app.exec_()
```

### Available Functions

```python
import qt_modern_style

# Apply stylesheet to application
qt_modern_style.apply(app)

# Get the stylesheet as string
stylesheet = qt_modern_style.get_stylesheet()

# Load the Qt resources (icons)
qt_modern_style.load_resources()

# Get an icon by name
icon = qt_modern_style.get_icon("save")

# Get icon path
path = qt_modern_style.get_icon_path("save")

# List all available icons
icons = qt_modern_style.list_icons()

# Get the path to the stylesheet file
qss_path = qt_modern_style.get_stylesheet_path()

# Get package directory
pkg_dir = qt_modern_style.get_package_dir()
```

### Primary and Danger Buttons

The stylesheet supports special button styles using Qt properties:

```python
# Primary button (blue accent)
button = QPushButton("Submit")
button.setProperty("primary", True)

# Danger button (red accent)
button = QPushButton("Delete")
button.setProperty("danger", True)
```

### Hint and Muted Labels

```python
# Hint label (darker text)
label = QLabel("This is a hint")
label.setProperty("hint", True)

# Muted label (lighter text)
label = QLabel("This is muted")
label.setProperty("muted", True)
```

## Color Palette

| Token | Color | Usage |
|-------|-------|-------|
| BG | `#FFFFFF` | Main background |
| BG-Soft | `#F3F6FA` | Secondary background |
| BG-Hover | `#EAF0F7` | Hover states |
| Border | `#C9D3DF` | Primary borders |
| Border-2 | `#AEBBCD` | Secondary borders |
| Text | `#2B3442` | Primary text |
| Text-2 | `#3A4758` | Secondary text |
| Muted | `#98A6B8` | Disabled/muted text |
| Selection | `#DCEBFF` | Selection background |
| Accent | `#2F6FED` | Primary accent (blue) |
| Danger | `#C23B3B` | Danger/error (red) |

## Available Icons

The package includes 500+ modern SVG icons. Some popular icons include:

- **Actions**: `save`, `copy`, `edit`, `delete`, `close`, `add`, `remove`, `search`, `settings`
- **Navigation**: `arrow-left`, `arrow-right`, `arrow-up`, `arrow-down`, `chevron-*`, `home`
- **Objects**: `file`, `folder`, `folder-opened`, `database`, `cloud`, `server`
- **Status**: `check`, `error`, `warning`, `info`, `loading`
- **Media**: `play`, `pause`, `stop`, `record`, `mic`
- **Social**: `github`, `twitter`, `heart`
- **And many more...**

To see all available icons:

```python
import qt_modern_style
for icon_name in qt_modern_style.list_icons():
    print(icon_name)
```

## Styled Widgets

The stylesheet provides consistent styling for all standard Qt widgets:

- QWidget, QFrame, QGroupBox
- QLabel, QLineEdit, QTextEdit, QPlainTextEdit
- QPushButton, QToolButton
- QCheckBox, QRadioButton
- QComboBox, QSpinBox, QDoubleSpinBox
- QDateEdit, QTimeEdit, QDateTimeEdit
- QTabWidget, QTabBar
- QMenuBar, QMenu
- QStatusBar, QToolBar
- QListView, QTreeView, QTableView
- QScrollBar, QSlider, QProgressBar
- QSplitter, QDialog
- QCalendarWidget
- QToolTip

## Examples

Check the `examples/` directory for complete working examples:

- `basic_example.py` - Simple application with basic widgets
- `widget_showcase.py` - Showcase of all styled widgets

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
