Kivy — it is a platform independent GUI tool in Python. Since it can run on Android, IOS, Linux, Windows, etc. It is mainly used to develop Android application, but that does not mean that it cannot be used in desktop applications.
To use the popup, you must import:
from kivy.uix.popup import Popup
The Popup widget is used to create popups. By default, the pop-up window covers the entire "parent" window. When you create a popup, you must at least set Popup.title and Popup.content.
Keep in mind that the default widget size is — size_hint = (1, 1). If you don’t want your popup to display full screen, you must either provide size hints with values less than 1 (for example, size_hint = (. 8, .8)), or deactivate size_hint and use fixed size attributes. P >
Note: Popup — this is a special widget. Don’t try to add it as a child to any other widget. If you do this, the Popup will be treated like a normal widget and will not be hidden in the background, for example:
1) import kivy 2 ) import kivyApp 3) import Widget 4) import Floatlayout 5) import Label 6) import popup 7) Set minimum version (optional) 8) Create widget class 9) Create Layout class: 10) create App class 9) create .kv file ( name same as the app class): 1) create Widget 2) create popup 3) Give label to popup 4) create button to close popup 10) return Layout / widget / Class (according to requirement) 11) define popup function (Which shows the popup on press the button) 12) Run an instance of the class
When the button click popup appears, click anywhere in the window except the popup disappears: