PyQt6-Fluent-Widgets-TextInputDialog


NamePyQt6-Fluent-Widgets-TextInputDialog JSON
Version 0.0.3 PyPI version JSON
download
home_page
SummaryIt provides a simple way to create text input dialogs.
upload_time2023-10-16 16:25:22
maintainer
docs_urlNone
authorChamiko
requires_python>=3.6, <3.12
license
keywords pyqt6 fluent-widgets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
## PyQt6-Fluent-Widgets-TextInputDialog



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





### Usage



```python

from qfluentwidgets_textinputdialog import TextInputDialog



# 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 PyQt6.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.3


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "PyQt6-Fluent-Widgets-TextInputDialog",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6, <3.12",
    "maintainer_email": "",
    "keywords": "PyQt6,Fluent-Widgets",
    "author": "Chamiko",
    "author_email": "Chamiko@foxmail.com",
    "download_url": "https://files.pythonhosted.org/packages/0a/3b/4bb8204d472e7e0ecf8f9eeea308ecb269042fb3763328edf3bdcae0e068/PyQt6-Fluent-Widgets-TextInputDialog-0.0.3.tar.gz",
    "platform": null,
    "description": "\r\n## PyQt6-Fluent-Widgets-TextInputDialog\r\r\n\r\r\nTextInputDialog is a library for creating text input dialogs based on PyQt6-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# 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 PyQt6.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.3\r\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "It provides a simple way to create text input dialogs.",
    "version": "0.0.3",
    "project_urls": null,
    "split_keywords": [
        "pyqt6",
        "fluent-widgets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a3b4bb8204d472e7e0ecf8f9eeea308ecb269042fb3763328edf3bdcae0e068",
                "md5": "f4736e15d444d54ee6b71cd5112a75e3",
                "sha256": "df2886c88b60e4a60f6a40b467529dfd92b3ea936fc5839ac4c5f5c990b71365"
            },
            "downloads": -1,
            "filename": "PyQt6-Fluent-Widgets-TextInputDialog-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "f4736e15d444d54ee6b71cd5112a75e3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6, <3.12",
            "size": 3176,
            "upload_time": "2023-10-16T16:25:22",
            "upload_time_iso_8601": "2023-10-16T16:25:22.189486Z",
            "url": "https://files.pythonhosted.org/packages/0a/3b/4bb8204d472e7e0ecf8f9eeea308ecb269042fb3763328edf3bdcae0e068/PyQt6-Fluent-Widgets-TextInputDialog-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-16 16:25:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pyqt6-fluent-widgets-textinputdialog"
}
        
Elapsed time: 0.20962s