diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-05-19 13:46:56 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-05-19 14:12:36 +0200 |
| commit | af83219d8a6e7ac1c0c8776f61b99ee37f30ef04 (patch) | |
| tree | 51fa216a02cefef75aef77313a048bf879c91a32 /examples/webchannel/standalone/core.py | |
| parent | 8cd50636102be2e1178c8c602a3e374891398e3e (diff) | |
Polish the QtWebChannel example
- Rename according to snake case conventions
- Connect sending to QLineEdit.returnPressed
Task-number: PYSIDE-1112
Change-Id: Ia0e1b81309985219688739a4cead8a252acd8dcc
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'examples/webchannel/standalone/core.py')
| -rw-r--r-- | examples/webchannel/standalone/core.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/webchannel/standalone/core.py b/examples/webchannel/standalone/core.py index ff62bdde1..d9b4bd20b 100644 --- a/examples/webchannel/standalone/core.py +++ b/examples/webchannel/standalone/core.py @@ -1,7 +1,7 @@ ############################################################################# ## ## Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com> -## Copyright (C) 2020 The Qt Company Ltd. +## Copyright (C) 2021 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## ## This file is part of the Qt for Python examples of the Qt Toolkit. @@ -51,7 +51,7 @@ class Core(QObject): def __init__(self, dialog, parent=None): super().__init__(parent) self._dialog = dialog - self._dialog.sendText.connect(self._emit_send_text) + self._dialog.send_text.connect(self._emit_send_text) @Slot(str) def _emit_send_text(self, text): @@ -59,4 +59,4 @@ class Core(QObject): @Slot(str) def receiveText(self, text): - self._dialog.displayMessage(f"Received message: {text}") + self._dialog.display_message(f"Received message: {text}") |
