【发布时间】:2019-10-20 10:42:29
【问题描述】:
我正在 kivy 中创建一个按钮,按下时,我希望它能够将用户引导至特定网站。我知道创建一个超链接,但我不知道如何在按钮中实现它。
我尝试在 text: 和 on_press: 中添加超链接。我也尝试过导入 webbrowser 并使用它,但没有成功。
Button:
text:'Click here to visit our website'
on_press: 'Not sure what to write here'
【问题讨论】:
-
on_press: webbrowser.open("https://www.google.com")
标签: python-3.x button hyperlink kivy onpress