Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python wx SplashScreen不';行不通_Python_User Interface_Wxpython_Wxwidgets - Fatal编程技术网

Python wx SplashScreen不';行不通

Python wx SplashScreen不';行不通,python,user-interface,wxpython,wxwidgets,Python,User Interface,Wxpython,Wxwidgets,我使用了wiki中的示例代码,但它对我来说不起作用,我什么也看不到。我做错了什么 import wx app = wx.App() aBitmap = wx.Image(name = "wxPyWiki.jpg").ConvertToBitmap() splashStyle = wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT splashDuration = 1000 splash = wx.adv.SplashScreen(aBitmap,

我使用了wiki中的示例代码,但它对我来说不起作用,我什么也看不到。我做错了什么

import wx

app = wx.App()

aBitmap = wx.Image(name = "wxPyWiki.jpg").ConvertToBitmap()
splashStyle = wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT
splashDuration = 1000

splash = wx.adv.SplashScreen(aBitmap, splashStyle,
                                 splashDuration, None)
splash.Show()
wx.Yield()

注意:SplashScreen不在wxpython 2.8.12的wx.adv中(我正在使用它)

这很有效(以我自己的形象)

唯一的区别是使用了
wx.Yield
vs
app.MainLoop


我不确定wxpython 2.9中的
Yield
的用途,但请注意,

是的,它也是wx中为我准备的。@AwarwwagRewafgggs检查wxpython文档和演示包,您可以从wxpython网站下载。你会在那里找到例子
import wx

app = wx.App()
aBitmap = wx.Image(name = "zimages/gato.jpg").ConvertToBitmap()
splashStyle = wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT
splashDuration = 1000

splash = wx.SplashScreen(aBitmap, splashStyle,
                                 splashDuration, None)
splash.Show()
app.MainLoop()