参考:https://www.pythonheidong.com/blog/article/183914/
from kivy.config import Config
from kivy.app import App
#设置窗口大小不变,必须添加到最前面
Config.set('graphics','resizable',False)
from kivy.uix.floatlayout import FloatLayout
#设置窗口大小
from kivy.core.window import Window
Window.size = (1440, 900)class SizeFloat(FloatLayout):def __init__(self, **kwargs):super().__init__(**kwargs)
class SizeApp(App):def build(self):return SizeFloat()
if __name__ == '__main__':SizeApp().run()