Benutzer-Werkzeuge

Webseiten-Werkzeuge


en:examples

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
en:examples [2022/08/22 11:07] – [Car] roehneren: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://www.guipy.de/examples/en/ean.zip|ean.zip]]    *[[https://www.guipy.de/examples/en/ean.zip|ean.zip]] 
 +
 +=== 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()
 +</code>
 +
 +The output is easier in Qt than in Tkinter/TTK:
 +
 +<code python>
 +    def output(self, line):
 +        self.Output.appendPlainText(line)
 +</code>
 +  
 +**Download**:
 +  *[[https://www.guipy.de/examples/en/qtean.zip|qtean.zip]] 
  
 ==== Car==== ==== Car====
en/examples.1661159252.txt.gz · Zuletzt geändert: 2022/08/22 11:07 von roehner