[問題] 新增checkbox的問題
大家好
我現在正在嘗試在main window上面新增一個checkbox
我在我的code裡面 寫了這樣子的一個敘述句
他的object name我給他就叫做 checkbox
from ui_MainWindow import Ui_MainWindow
if Ui_MainWindow.checkbox.ischecked():
print "You select the item"
else:
print "Please select item"
可是他會一直給我
AttributeError: 'Ui_MainWindow' object has no attribute 'checkbox'
這個錯誤
請問 要怎麼修正這個錯誤呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.63.202
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
Python 近期熱門文章
PTT數位生活區 即時熱門文章