PySide6-FeatherIcons-QML


NamePySide6-FeatherIcons-QML JSON
Version 0.1.2 PyPI version JSON
download
home_page
SummaryAdds Feather Icons usable in QML for PySide6
upload_time2024-03-08 20:19:34
maintainer
docs_urlNone
authorCuberootex
requires_python>=3.8
licenseMIT
keywords pyside qt pyside6 feather icons qml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PySide6 Feather Icons 

A PySide6 library for integrating Feather icons into QML.

[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FCuberootex%2FPySide6_FeatherIcons_QML&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23404040&title=hits&edge_flat=false)](https://hits.seeyoufarm.com)

## Installation

In your Python project, if you are using a virtual environment, source it, then run
```
pip install PySide6-FeatherIcons-QML
```

Your app's `QQmlApplicationEngine` first needs to be registered before any icons can be used. This is done with the `FeatherIconsQML.register(e: QQmlApplicationEngine)` method.

```python
# main.py

(...)

from PySide6.QtQml import QQmlApplicationEngine
import FeatherIconsQML

(...)

engine = QQmlApplicationEngine()
FeatherIconsQML.register(engine)

```

The `FeatherIcons` module can now be imported inside QML files:

```qml
// view.qml
import FeatherIcons
```

## Usage



### 1. FeatherIcon QML object


The `FeatherIcon` QML object is used to display icons.

#### Properties

| Name        | Type   | Required | Default | Notes                                                                                              |
| ----------- | ------ | -------- | ------- | -------------------------------------------------------------------------------------------------- |
| icon        | string | **true**     |         | A valid Feather icon name. All possible Feather icons can be found here: https://feathericons.com/ |
| iconSize    | real   | false    | 24      |                                                                                                    |
| strokeWidth | real   | false    | 2.0     | Accepted values are: 0.5, 1.0, 1.5, 2.0, 2.5, 3.0                                                  |
| color       | color | false    | "black" |                                                                                                    |
|shadowEnabled|bool|false|false|This and other shadow/blur-related properties are passed to a `MultiEffect` QML object (https://doc.qt.io/qt-6/qml-qtquick-effects-multieffect.html)|
|shadowColor|color|false|"black"||
|shadowHorizontalOffset|real|false|2||
|shadowVerticalOffset|real|false|2||
|shadowBlur|real|false|0.6|Value ranges from 0.0 to 1.0|
|shadowOpacity|real|false|0.6|Value ranges from 0.0 to 1.0|
|shadowScale|real|false|1.0||
|blurEnabled|bool|false|false||
|blur|real|false|0.0|Value ranges from 0.0 to 1.0|
|blurMax|int|false|32|Affects both blur and shadow effects.|
|blurMultiplier|real|false|1.0|Affects both blur and shadow effects.|


Because a `FeatherIcon` is first and foremost a QML `Item` under the hood, it also supports the properties listed here: https://doc.qt.io/qt-6/qml-qtquick-item.html

#### Example 

```qml
// view.qml
import FeatherIcons

(...)

FeatherIcon {
	icon: "feather"
}

FeatherIcon {
	icon: "activity"
	iconSize: 48
	color: "white"
	strokeWidth: 1.5
}
```


### 2. Icons in Qt Quick Controls

Buttons, item delegates and menu items can present an icon in addition to a text label with Qt Quick Controls. In order to use Feather icons with such components, this library exposes a `FeatherIconsVault` singleton class containing a `getSource` method. 

For more information regarding Icons in Qt Quick Controls, please see: https://doc.qt.io/qt-6/qtquickcontrols-icons.html

#### `getSource(featherIconName: string, strokeWidth?: number): string`


Returns the source URL of a Feather icon given its `featherIconName` and a `strokeWidth`, which can then be passed to the `icon.source` property (of a `Button`, for example).
|Arguments|Default value|Details|
|--|--|--|
|featherIconName||A valid Feather icon name.
|strokeWidth|2.0|Accepted values are: 0.5, 1.0, 1.5, 2.0, 2.5, 3.0| 

#### Example

```qml
// view.qml
import QtQuick.Controls
import FeatherIcons

...

Button {
	text: "Increase"
	icon.source: FeatherIconsVault.getSource("plus")
	icon.color: "green"
}
```








            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "PySide6-FeatherIcons-QML",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "PySide Qt PySide6 Feather Icons QML",
    "author": "Cuberootex",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/c2/17/f82a52914b504a47da0432d11aba5b1300286cf850c2387669368776d76e/PySide6_FeatherIcons_QML-0.1.2.tar.gz",
    "platform": null,
    "description": "# PySide6 Feather Icons \n\nA PySide6 library for integrating Feather icons into QML.\n\n[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FCuberootex%2FPySide6_FeatherIcons_QML&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23404040&title=hits&edge_flat=false)](https://hits.seeyoufarm.com)\n\n## Installation\n\nIn your Python project, if you are using a virtual environment, source it, then run\n```\npip install PySide6-FeatherIcons-QML\n```\n\nYour app's `QQmlApplicationEngine` first needs to be registered before any icons can be used. This is done with the `FeatherIconsQML.register(e: QQmlApplicationEngine)` method.\n\n```python\n# main.py\n\n(...)\n\nfrom PySide6.QtQml import QQmlApplicationEngine\nimport FeatherIconsQML\n\n(...)\n\nengine = QQmlApplicationEngine()\nFeatherIconsQML.register(engine)\n\n```\n\nThe `FeatherIcons` module can now be imported inside QML files:\n\n```qml\n// view.qml\nimport FeatherIcons\n```\n\n## Usage\n\n\n\n### 1. FeatherIcon QML object\n\n\nThe `FeatherIcon` QML object is used to display icons.\n\n#### Properties\n\n| Name        | Type   | Required | Default | Notes                                                                                              |\n| ----------- | ------ | -------- | ------- | -------------------------------------------------------------------------------------------------- |\n| icon        | string | **true**     |         | A valid Feather icon name. All possible Feather icons can be found here: https://feathericons.com/ |\n| iconSize    | real   | false    | 24      |                                                                                                    |\n| strokeWidth | real   | false    | 2.0     | Accepted values are: 0.5, 1.0, 1.5, 2.0, 2.5, 3.0                                                  |\n| color       | color | false    | \"black\" |                                                                                                    |\n|shadowEnabled|bool|false|false|This and other shadow/blur-related properties are passed to a `MultiEffect` QML object (https://doc.qt.io/qt-6/qml-qtquick-effects-multieffect.html)|\n|shadowColor|color|false|\"black\"||\n|shadowHorizontalOffset|real|false|2||\n|shadowVerticalOffset|real|false|2||\n|shadowBlur|real|false|0.6|Value ranges from 0.0 to 1.0|\n|shadowOpacity|real|false|0.6|Value ranges from 0.0 to 1.0|\n|shadowScale|real|false|1.0||\n|blurEnabled|bool|false|false||\n|blur|real|false|0.0|Value ranges from 0.0 to 1.0|\n|blurMax|int|false|32|Affects both blur and shadow effects.|\n|blurMultiplier|real|false|1.0|Affects both blur and shadow effects.|\n\n\nBecause a `FeatherIcon` is first and foremost a QML `Item` under the hood, it also supports the properties listed here: https://doc.qt.io/qt-6/qml-qtquick-item.html\n\n#### Example \n\n```qml\n// view.qml\nimport FeatherIcons\n\n(...)\n\nFeatherIcon {\n\ticon: \"feather\"\n}\n\nFeatherIcon {\n\ticon: \"activity\"\n\ticonSize: 48\n\tcolor: \"white\"\n\tstrokeWidth: 1.5\n}\n```\n\n\n### 2. Icons in Qt Quick Controls\n\nButtons, item delegates and menu items can present an icon in addition to a text label with Qt Quick Controls. In order to use Feather icons with such components, this library exposes a `FeatherIconsVault` singleton class containing a `getSource` method. \n\nFor more information regarding Icons in Qt Quick Controls, please see: https://doc.qt.io/qt-6/qtquickcontrols-icons.html\n\n#### `getSource(featherIconName: string, strokeWidth?: number): string`\n\n\nReturns the source URL of a Feather icon given its `featherIconName` and a `strokeWidth`, which can then be passed to the `icon.source` property (of a `Button`, for example).\n|Arguments|Default value|Details|\n|--|--|--|\n|featherIconName||A valid Feather icon name.\n|strokeWidth|2.0|Accepted values are: 0.5, 1.0, 1.5, 2.0, 2.5, 3.0| \n\n#### Example\n\n```qml\n// view.qml\nimport QtQuick.Controls\nimport FeatherIcons\n\n...\n\nButton {\n\ttext: \"Increase\"\n\ticon.source: FeatherIconsVault.getSource(\"plus\")\n\ticon.color: \"green\"\n}\n```\n\n\n\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Adds Feather Icons usable in QML for PySide6",
    "version": "0.1.2",
    "project_urls": {
        "Source code": "https://github.com/Cuberootex/PySide6_FeatherIcons_QML"
    },
    "split_keywords": [
        "pyside",
        "qt",
        "pyside6",
        "feather",
        "icons",
        "qml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c217f82a52914b504a47da0432d11aba5b1300286cf850c2387669368776d76e",
                "md5": "205e33d2820e279b482e42830fd13f32",
                "sha256": "7c949d35df37b8a25534785d0dd026094e2dd688f052878c037b7271e2868dc2"
            },
            "downloads": -1,
            "filename": "PySide6_FeatherIcons_QML-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "205e33d2820e279b482e42830fd13f32",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 142292,
            "upload_time": "2024-03-08T20:19:34",
            "upload_time_iso_8601": "2024-03-08T20:19:34.527952Z",
            "url": "https://files.pythonhosted.org/packages/c2/17/f82a52914b504a47da0432d11aba5b1300286cf850c2387669368776d76e/PySide6_FeatherIcons_QML-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-08 20:19:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Cuberootex",
    "github_project": "PySide6_FeatherIcons_QML",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyside6-feathericons-qml"
}
        
Elapsed time: 0.23409s