Skip to main content

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

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

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

Metadata

Release files for PySide6-Fluent-Widgets-TextInputDialog 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PySide6-Fluent-Widgets-TextInputDialog 0.0.3
File Size Uploaded
PySide6-Fluent-Widgets-TextInputDialog-0.0.3.tar.gz 3.3 kB Details

Release files / PySide6-Fluent-Widgets-TextInputDialog-0.0.3.tar.gz

Download URL PySide6-Fluent-Widgets-TextInputDialog-0.0.3.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3170d4633eb120808936f98a56250179af9c1522e7e57cf15727ab5f83b34a94
BLAKE2b-256 checksum
How to use checksums
0d669e915ad4a3f650b855d05bf2e2272d38a43fe4da294fbd49b3f741f739ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page