简体   繁体   中英

How to create a Kivy file (.kv)

So I am working off of this tutorial: https://youtu.be/j9PqNe3J_Cc?t=1m55s

At the time stamp in that link (1:55) the guy goes over to another file he created. This file is a .kv file. When I try to create a new file, there are multiple options, but no kivy file type option. Should I just create a text file, or is there something I am missing?

For the record, I am using PyCharm, just like the guy in the video (also I'm using Mac)

Lastly, the guy's first file is called kivytut.py. Is that simply what he chose to name it, or are there generally accepted names for kivy files that people usually use?

Thanks in advance!

kv file

In PyCharm, click on File > New > File or right mouse click New > File and enter customwidget.kv as filename.

Python file

You can name the file as kivytut.py . But if it is the main entry point to your Kivy App, then name it as main.py because Buildozer will be looking for a file with the name main.py

References » Programming Guide

Below are some of the titles. Please check out all the titles under Programming Guide.

Kivy Basics

Kv language

Events and Properties

你要做的就是把它变成一个文本文件 把它变成一个 python 文件会产生很多红线,让你的代码看起来很糟糕 只要把它变成一个文本文件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM