Pyside6-Fluent-Widgets-TextInputDialog


NamePyside6-Fluent-Widgets-TextInputDialog JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryIt provides a simple way to create text input dialogs.
upload_time2023-10-16 01:50:14
maintainer
docs_urlNone
authorChamiko
requires_python>=3.6, <3.12
license
keywords pyside6 fluent-widgets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
## PySide6-Fluent-Widgets-TextInputDialog



TextInputDialog is a library for creating text input dialogs based on PySide6-Fluent-Widgets. It provides a simple way to create text input dialogs.





### Usage



```python

from qfluentwidgets_textinputdialog import TextInputDialog



# Create a text input dialog

dialog = TextInputDialog(parent)



# Set the language (default is English)

TextInputDialog.setLanguage(TextInputDialog.Language.ENGLISH)



# Get the text input

text, success = TextInputDialog.getText(parent, title=..., placeholder=..., yesButton=..., noButton=..., mode=...)

```



### Parameters



- `parent`: The parent widget.

- `title`: The title of the dialog (optional, default is "Please enter").

- `placeholder`: The placeholder text for the input field (optional).

- `yesButton`: The text for the confirm button (optional, default is "Confirm").

- `noButton`: The text for the cancel button (optional, default is "Cancel").

- `mode`: The input mode (optional, default is LINEEDIT, can be LINEEDIT or TEXTEDIT).



### Example



```python

from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton

from qfluentwidgets_textinputdialog import TextInputDialog



class MainWindow(QMainWindow):

    def __init__(self):

        super().__init__()

        self.setWindowTitle("TextInputDialog Example")

        self.setGeometry(100, 100, 500, 500)



        button = QPushButton("Open Dialog", self)

        button.setGeometry(100, 100, 200, 50)

        button.clicked.connect(self.open_dialog)



    def open_dialog(self):

        text, success = TextInputDialog.getText(self, title="Please enter your name", placeholder="Enter your name", yesButton="OK", noButton="Cancel")

        if success:

            print("Your name is:", text)



app = QApplication([])

window = MainWindow()

window.show()

app.exec()

```



### Version



Current version: 0.0.2


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "Pyside6-Fluent-Widgets-TextInputDialog",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6, <3.12",
    "maintainer_email": "",
    "keywords": "PySide6,Fluent-Widgets",
    "author": "Chamiko",
    "author_email": "Chamiko@foxmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1a/19/33cffc9f5681dcaab1efb2a51db6da565960d7829f0863edb27e34e47da6/Pyside6-Fluent-Widgets-TextInputDialog-0.0.2.tar.gz",
    "platform": null,
    "description": "\r\n## PySide6-Fluent-Widgets-TextInputDialog\r\r\n\r\r\nTextInputDialog is a library for creating text input dialogs based on PySide6-Fluent-Widgets. It provides a simple way to create text input dialogs.\r\r\n\r\r\n\r\r\n### Usage\r\r\n\r\r\n```python\r\r\nfrom qfluentwidgets_textinputdialog import TextInputDialog\r\r\n\r\r\n# Create a text input dialog\r\r\ndialog = TextInputDialog(parent)\r\r\n\r\r\n# Set the language (default is English)\r\r\nTextInputDialog.setLanguage(TextInputDialog.Language.ENGLISH)\r\r\n\r\r\n# Get the text input\r\r\ntext, success = TextInputDialog.getText(parent, title=..., placeholder=..., yesButton=..., noButton=..., mode=...)\r\r\n```\r\r\n\r\r\n### Parameters\r\r\n\r\r\n- `parent`: The parent widget.\r\r\n- `title`: The title of the dialog (optional, default is \"Please enter\").\r\r\n- `placeholder`: The placeholder text for the input field (optional).\r\r\n- `yesButton`: The text for the confirm button (optional, default is \"Confirm\").\r\r\n- `noButton`: The text for the cancel button (optional, default is \"Cancel\").\r\r\n- `mode`: The input mode (optional, default is LINEEDIT, can be LINEEDIT or TEXTEDIT).\r\r\n\r\r\n### Example\r\r\n\r\r\n```python\r\r\nfrom PySide6.QtWidgets import QApplication, QMainWindow, QPushButton\r\r\nfrom qfluentwidgets_textinputdialog import TextInputDialog\r\r\n\r\r\nclass MainWindow(QMainWindow):\r\r\n    def __init__(self):\r\r\n        super().__init__()\r\r\n        self.setWindowTitle(\"TextInputDialog Example\")\r\r\n        self.setGeometry(100, 100, 500, 500)\r\r\n\r\r\n        button = QPushButton(\"Open Dialog\", self)\r\r\n        button.setGeometry(100, 100, 200, 50)\r\r\n        button.clicked.connect(self.open_dialog)\r\r\n\r\r\n    def open_dialog(self):\r\r\n        text, success = TextInputDialog.getText(self, title=\"Please enter your name\", placeholder=\"Enter your name\", yesButton=\"OK\", noButton=\"Cancel\")\r\r\n        if success:\r\r\n            print(\"Your name is:\", text)\r\r\n\r\r\napp = QApplication([])\r\r\nwindow = MainWindow()\r\r\nwindow.show()\r\r\napp.exec()\r\r\n```\r\r\n\r\r\n### Version\r\r\n\r\r\nCurrent version: 0.0.2\r\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "It provides a simple way to create text input dialogs.",
    "version": "0.0.2",
    "project_urls": null,
    "split_keywords": [
        "pyside6",
        "fluent-widgets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1a1933cffc9f5681dcaab1efb2a51db6da565960d7829f0863edb27e34e47da6",
                "md5": "db3e9fb068005de6e380d6dd72ba2724",
                "sha256": "2864786b3d3e8d676a1e207dce324d5728a82558d7cf9c0a54a07d7899853aea"
            },
            "downloads": -1,
            "filename": "Pyside6-Fluent-Widgets-TextInputDialog-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "db3e9fb068005de6e380d6dd72ba2724",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6, <3.12",
            "size": 3280,
            "upload_time": "2023-10-16T01:50:14",
            "upload_time_iso_8601": "2023-10-16T01:50:14.306619Z",
            "url": "https://files.pythonhosted.org/packages/1a/19/33cffc9f5681dcaab1efb2a51db6da565960d7829f0863edb27e34e47da6/Pyside6-Fluent-Widgets-TextInputDialog-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-16 01:50:14",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pyside6-fluent-widgets-textinputdialog"
}
        
Elapsed time: 0.13483s