Outils pour utilisateurs

Outils du site


kivy_comment_faire_un_tas_de_chose

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
Prochaine révisionLes deux révisions suivantes
kivy_comment_faire_un_tas_de_chose [2020/01/20 17:51] – [Comment lister tous les widgets dans le python] sergekivy_comment_faire_un_tas_de_chose [2020/02/17 15:11] – [Des explications avec les exemples des sources] serge
Ligne 4: Ligne 4:
 **[[http://translate.google.com/translate?hl=&sl=auto&tl=en&u=https%3A%2F%2Fressources.labomedia.org%2Fkivy_comment_faire_un_tas_de_chose|English Version]]** **[[http://translate.google.com/translate?hl=&sl=auto&tl=en&u=https%3A%2F%2Fressources.labomedia.org%2Fkivy_comment_faire_un_tas_de_chose|English Version]]**
 </WRAP> </WRAP>
 +<WRAP center round box 40% centeralign> 
 +**[[les_pages_kivy_en_details|Les pages Kivy en détails]]** 
 +</WRAP>
 ===== Comment chercher ? ===== ===== Comment chercher ? =====
 ====Sur internet==== ====Sur internet====
Ligne 33: Ligne 35:
   * **video player** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/videoplayer.py|videoplayer.py]]   * **video player** : [[https://github.com/kivy/kivy/blob/master/examples/widgets/videoplayer.py|videoplayer.py]]
   * **ErrorPopup(Popup)** : [[https://github.com/kivy/plyer/blob/master/examples/text2speech/main.py|main.py]] et [[https://github.com/kivy/plyer/blob/master/examples/text2speech/text2speechdemo.kv|text2speechdemo.kv]]   * **ErrorPopup(Popup)** : [[https://github.com/kivy/plyer/blob/master/examples/text2speech/main.py|main.py]] et [[https://github.com/kivy/plyer/blob/master/examples/text2speech/text2speechdemo.kv|text2speechdemo.kv]]
 +  * **Slider** : [[https://github.com/kivy/kivy/blob/master/examples/canvas/circle.py|circle.py]]
 +  * **Clock** : [[https://github.com/kivy/kivy/blob/master/examples/tutorials/pong/main.py|Pong]] ou [[https://github.com/kivy/kivy/blob/master/examples/canvas/mesh_manipulation.py|mesh_manipulation.py]]
 +
 +
 +
 +
 +=====Adapter la résolution dpi sur son PC=====
 +  * Sur votre PC, définir la taille de votre fenêtre
 +<code python>
 +from kivy.core.window import Window
 +# Les 3 lignes ci-dessous sont à commenter pour buildozer
 +# L'écran de mon tél fait 1280*720
 +k = 1.0
 +WS = (int(1280*k), int(720*k))
 +Window.size = WS
 +</code>
 +
 +Lancer le main.py avec:
 +  KIVY_METRICS_FONTSCALE=1.2 python3 main.py
 +avec une valeur "1.2" à adapter pour que vous ayez le même graphisme sur votre PC que sur votre téléphone.
 +
 +
 =====Comment lister tous les widgets dans le python===== =====Comment lister tous les widgets dans le python=====
   * **[[https://kivy.org/doc/stable/api-kivy.uix.widget.html#kivy.uix.widget.Widget.walk|walking this tree]]**   * **[[https://kivy.org/doc/stable/api-kivy.uix.widget.html#kivy.uix.widget.Widget.walk|walking this tree]]**
kivy_comment_faire_un_tas_de_chose.txt · Dernière modification : 2022/11/19 09:49 de serge