Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
PyQt QApplication takes 10 seconds - can I have a splash screen?
I'm on OSX with PyQt4.
If I run:
from PyQt4.QtCore import *
from PyQt4.QtGui import *
the imports takes < .5 second.
Then I run:
q = QApplication(sys.argv)
which unfortunately takes a full 8 seconds!
I've sort of resigned myself to paying this cost. Is there any way I can display a splash screen during this time? I wanted to use QSplashScreen, but I assume I need a QApplication first...
hpollak last edited by
Which QT-Version to you use?
See also following links (no splahscreen but startup):
I have PyQt 4.9.4
StackOverflow says 'There is a known bug in Qt 4.6.3 that cripples application start times.' I was hopefuly that I might have 4.6.3 b/c that might explain it, but now I'm not sure.
I would like QApplication instantiation to be faster more than anything. Perhaps this has something to do with dynamic library allocation, as StackOverflow suggests.
Can anybody who has experienced QApplication constructor running quickly describe how they install PyQt on OSX? I used an installer, maybe I should compile myself?
Any ideas, anyone?
I have found an adequate solution.
I installed Qt and PySide, and now QApplication constructor time is about 2 seconds. There is still some lag before my app shows up, but that is my own initialization, and now I can show a splash screen.
Long live PySide.