|
|
今天使用wxpython做ico时候出现错误:Things are going to break, please only change locale by creating wxLocale objects to avoid this!
在下面代码之前只需添加“self.locale = wx.Locale(wx.LANGUAGE_ENGLISH)”
icon = wx.EmptyIcon()
icon.CopyFromBitmap(wx.BitmapFromImage(wx.Image((icopath2),wx.BITMAP_TYPE_PNG)))
self.SetIcon(icon)
修改后为:
self.locale = wx.Locale(wx.LANGUAGE_ENGLISH)
icon = wx.EmptyIcon()
icon.CopyFromBitmap(wx.BitmapFromImage(wx.Image((icopath2),wx.BITMAP_TYPE_PNG)))
self.SetIcon(icon)
问题成功解决!
|
评分
-
查看全部评分
|