放棄tkinter轉(zhuǎn)投wxpython
2020-03-13 15:49 作者:一心想當(dāng)網(wǎng)紅的李老師 | 我要投稿
實(shí)在是因?yàn)楦悴欢╰kinter和opencv的交互。同時(shí)資料不太多。
所以改投wxpython門(mén)下吧。去個(gè)大社區(qū),幫助多多的。
import wx
class Frame(wx.Frame):
? ? def _init_(self):
? ? ? ? wx.Frame._init_(self,None,-1,"open",size=(100,100))
? ? ? ? panel=wx.Panel(self,-1)
? ? ? ? self.button=wx.Button(panel,-1,"open",pos=(20,20))
? ? ? ? self.Bind(wx.EVT_BUTTON,self.ONclick,self.button)
? ? ? ? self.button.SetDefault()
? ? ? ??
? ? def OnClick(self,event):
? ? ? ? self.Button.SetLabel("click")
? ? ? ??
if __name__=='_main_':
? ? app=wx.PySimpleApp()
? ? frame=Frame
? ? frame.Show()
? ? app.MainLoop()
運(yùn)行了程序,不報(bào)錯(cuò),不顯示????
標(biāo)簽: