Python function returns PY_VAR1 unexpectedly

后端 未结 1 1092
醉话见心
醉话见心 2021-01-26 03:17

I am expecting my button function to print a number (minutes_selected) based on the current value of the Spinner UI element, but the variable is always PY_VAR1:

1条回答
  •  我在风中等你
    2021-01-26 03:50

    You need to use the get method to get the value of the variable.

    Change this:

    print(mintes_selected)
    

    To this:

    print(minutes_selected.get())
    

    0 讨论(0)
提交回复
热议问题