Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. PyQt QApplication takes 10 seconds - can I have a splash screen?
Qt 6.11 is out! See what's new in the release blog

PyQt QApplication takes 10 seconds - can I have a splash screen?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 6.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    syr123
    wrote on last edited by
    #1

    I'm on OSX with PyQt4.

    If I run:

    from PyQt4.QtCore import *
    from PyQt4.QtGui import *
    import sys

    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...

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hpollak
      wrote on last edited by
      #2

      Which QT-Version to you use?

      See also following links (no splahscreen but startup):

      "http://talk.maemo.org/showthread.php?t=47850":http://talk.maemo.org/showthread.php?t=47850

      "http://stackoverflow.com/questions/3994443/why-is-pyqt-application-startup-so-slow":http://stackoverflow.com/questions/3994443/why-is-pyqt-application-startup-so-slow

      "http://stackoverflow.com/questions/10059859/pyqt-program-startup-is-very-slow-on-ubuntu":http://stackoverflow.com/questions/10059859/pyqt-program-startup-is-very-slow-on-ubuntu

      1 Reply Last reply
      0
      • S Offline
        S Offline
        syr123
        wrote on last edited by
        #3

        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?

        I'm on:

        Python 2.7.3
        PyQt 4.9.4
        OSX 10.7.4

        Any ideas, anyone?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          syr123
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved