Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6101113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:27:48+00:00 2026-05-23T13:27:48+00:00

I want to add QSplashScreen to PyQT4 application. It works fine from Python, but

  • 0

I want to add QSplashScreen to PyQT4 application. It works fine from Python,
but when I create exe with py2exe, a splash image is invisible, the app waits 2 sec and shows the main window. What is wrong?

Application code:

if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)

    # Create and display the splash screen
    splash_pix = QPixmap('images/splash.jpg')
    splash = QSplashScreen(splash_pix, QtCore.Qt.WindowStaysOnTopHint)
    splash.setMask(splash_pix.mask())
    splash.show()
    app.processEvents()

    time.sleep(2)

    myapp = Main()
    myapp.show()
    splash.finish(myapp)
    sys.exit(app.exec_())

setup.py:

#!/usr/bin/env python

from py2exe.build_exe import py2exe
from distutils.core import setup

setup(name='-',
      version='1.0',
      description='-',
      author='-',
      author_email='-',
      windows=[{"script": "main.py"}],
      data_files=[
                ('phonon_backend', [
                    'C:\Python26\Lib\site-packages\PyQt4\plugins\phonon_backend\phonon_ds94.dll'
                    ]),
                  'settings.yaml',
                  ('images', ['images/accept.png',
                              'images/splash.jpg',

                              ]),
                  'loader.png',
                  'licence.txt',
                  'about.txt',
                  ],
     )
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:27:48+00:00Added an answer on May 23, 2026 at 1:27 pm

    PNG support comes by default, JPEG support is by a plugin which will need to be included in some way.

    There was a thread recently on the PySide mailing list about this sort of thing with cx_freeze, starts at http://lists.pyside.org/pipermail/pyside/2010-December/001656.html. the solution will be approximately the same for PyQt4 and py2exe.

    The final solution there was basically this:

    Next to the produced .exe file, put qt.conf with this in it:

    [Paths]
    Plugins = plugins
    

    (You could use a value other than “plugins”, change the subdirectory name to match.)

    Create a subdirectory plugins and in it another subdirectory imageformats. Copy qjpeg4.dll in here. It’ll be in a path like C:\Python27\Lib\site-packages\PyQt4\plugins\imageformats.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to add my own member to the StringBuilder class, but when I
I have an application that I want add some cool animations to show state
I want to create an custom control (descendant of TRichEdit). I simply want add
We want to add billing capabilities to our rails-driven web application. I've come across
I want to add the following line to ~/.bashrc: export PATH:/var/lib/gems/1.9.1/bin:$PATH But only if
I have dbml with single table users i want add partial class for User
I want to add a column to an existing legacy database and write a
I want to add a constant value onto an incoming bound integer. In fact
I want to add a scheduled task to a client's ASP.NET app. These posts
I want to add a mailto link on our web page. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.