Home > other >  Consult a great god, wxPython set in the startup picture SplashScreen problem
Consult a great god, wxPython set in the startup picture SplashScreen problem

Time:09-26

Environment: Anaconda3 Python3.6 wxPython4.0
Question: in trying to program to add the image, find a piece of code is as follows:
The import wx
The class PaintApp (wx App) :
Def OnInit (self) :
BMP=wx. Image (" wxPython. JPG ")
Wx. SplashScreen (BMP, wx SPLASH_CENTER_ON_SCREEN | wx. SPLASH_TIMEOUT, 1000, None, 1)
Wx. Yield ()
Frame=PaintFrame (None)
Frame. The Show (True)
Self. SetTopWindow (frame)
Return True
If __name__=="__main__ ':
App=PaintApp ()
App. MainLoop ()
There is no other mistake, only hint "AttributeError: module 'wx has no attribute' SplashScreen",
Running normal window procedure is no problem, only used in wx. The SplashScreen () is just an error, online for a long time and almost no similar mistake, will is a version of the problem?
In this first thanked you requested

CodePudding user response:

3.0 can, which version are you using?

CodePudding user response:

The from wx import adv

Adv. SplashScreen (BMP,
Adv. SPLASH_CENTER_ON_SCREEN | adv. SPLASH_TIMEOUT,
3000,
None,
1)
  • Related