It looks like kivyMD doesn’t want to be learned by me. Or maybe I’m not learning in the right way. After solving an installation problem, now I have one with kivyMD. Even if I try a simple code like the one in https://kivymd.readthedocs.io/en/latest/components/button/ (I’ll copy the code below) I have this error:
Traceback (most recent call last):
File "c:Kivy.mdMyquizletintento.py", line 2, in <module>
from kivymd.uix.button import MDButton, MDButtonIcon, MDButtonText
ImportError: cannot import name 'MDButton' from 'kivymd.uix.button' (C:Kivy.mdvirtLibsite-packageskivymduixbutton__init__.py). Did you mean: 'button'?
The code is as following:
from kivymd.app import MDApp
from kivymd.uix.button import MDButton, MDButtonIcon, MDButtonText
from kivymd.uix.screen import MDScreen
class Example(MDApp):
def build(self):
self.theme_cls.primary_palette = "Green"
return (
MDScreen(
MDButton(
MDButtonIcon(
icon="plus",
),
MDButtonText(
text="Elevated",
),
style="elevated",
pos_hint={"center_x": 0.5, "center_y": 0.5},
),
md_bg_color=self.theme_cls.surfaceColor,
)
)
Example().run()
I’m using kivyMD 2.0.0. Any ideas?
I’ve tried to use an MDButton in other codes, but it’s still not working. If you need, I’ll post the other codes, but it’s basically the same.