en:examples
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende Überarbeitung | |||
en:examples [2022/08/22 11:07] – [Car] roehner | en:examples [2022/08/25 21:28] (aktuell) – [EAN check] roehner | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
===== Examples ===== | ===== Examples ===== | ||
==== EAN check ==== | ==== EAN check ==== | ||
+ | === Tkinter/TTK === | ||
The EAN check is an example of a simple GUI application. It has an entry widget for entering an EAN and a text widget for the multi-line output of results. | The EAN check is an example of a simple GUI application. It has an entry widget for entering an EAN and a text widget for the multi-line output of results. | ||
Zeile 61: | Zeile 62: | ||
**Download**: | **Download**: | ||
*[[https:// | *[[https:// | ||
+ | |||
+ | === Qt variant of EAN check === | ||
+ | In Qt we have a LineEdit widget for input and a PlainTextWidget for output. To read the EAN we use the //text()// method of LineEdit widget. | ||
+ | |||
+ | <code python> | ||
+ | EAN = self.leEAN.text() | ||
+ | </ | ||
+ | |||
+ | The output is easier in Qt than in Tkinter/ | ||
+ | |||
+ | <code python> | ||
+ | def output(self, | ||
+ | self.Output.appendPlainText(line) | ||
+ | </ | ||
+ | | ||
+ | **Download**: | ||
+ | *[[https:// | ||
==== Car==== | ==== Car==== |
en/examples.1661159252.txt.gz · Zuletzt geändert: 2022/08/22 11:07 von roehner