Results 1 to 5 of 5

Thread: gif files don't show after compiling with py2exe (using PyQt)

  1. #1
    Join Date
    Jan 2011
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default gif files don't show after compiling with py2exe (using PyQt)

    For some reason on my system (Windows XP 32-bit, Python 2.6) PyQt is able to display gifs perfectly when run in the python interpreter, but when I run it through py2exe, they no longer display.

    I've tried everything I've googled: copying the gif DLLs from PyQt into an imageformats/ folder, done a setLibraryPaths to where the imageformat DLLs were, copied the setup file from http://wiki.wxpython.org/py2exe-python26 .

    Nothing seems to work -- what on earth could I be doing wrong?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: gif files don't show after compiling with py2exe (using PyQt)

    Can you display say... jpg files? What about png files?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2011
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: gif files don't show after compiling with py2exe (using PyQt)

    .jpgs do not show, .png files do.

    Dunno if this helps, but I checked with ProcessExplorer: if I copy the plugins/imageformats into the py2exe application's folder (as has worked for other people with this problem), the application does actually use those DLLs, but it still doesn't work. When I run the program as a python script, .jpgs and .gifs show and I find it is using the same DLLs (in the C:\Python26\... dir) that I copied to the application folder.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: gif files don't show after compiling with py2exe (using PyQt)

    Directory with the executable has to contain a subdirectory called imageformats that contains the files implementing the plugins. If you are using Qt in debug mode, you need plugins with "d" in their name (i.e. qjpegd4.dll or something like that).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jan 2011
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: gif files don't show after compiling with py2exe (using PyQt)

    I've tried copying the gif DLLs from PyQt into an imageformats/ and as I stated earlier, it doesn't work. What I was saying was that with the process manager was that when I run it as a python script, it uses the DLLs in Python26/Lib/<qt dir>, and when I copy those DLLs to the folder the executable is in (as imageformats/), it uses them but it still doesn't display the jpgs or gifs properly.

    I am fairly certain I am not using Qt in debug mode, since I haven't set any options to do so.

Similar Threads

  1. Compiling .c files using C++ and QT
    By kurt-hardy in forum General Programming
    Replies: 3
    Last Post: 7th September 2010, 18:18
  2. Replies: 3
    Last Post: 12th July 2010, 13:12
  3. Replies: 9
    Last Post: 28th April 2010, 09:18
  4. Compiling cpp files with qt cmd
    By Noks in forum Newbie
    Replies: 8
    Last Post: 16th January 2010, 19:58
  5. Compiling PyQt with MinGW
    By QuiGon in forum Installation and Deployment
    Replies: 0
    Last Post: 13th April 2008, 07:20

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.