Program shows png files, but doesn't show jpg files.
Screenshots of my program, using png/jpg files:
png https://i.stack.imgur.com/xw4vQ.png
jpg https://i.stack.imgur.com/R5T9q.png
If not compiled with py2exe, program works normally and shows all formats.
So I think it's py2exe problem.
I have in both situations this code:
(pic
is QLabel
, picLine
is some Layout
)
px = QtGui.QPixmap(pic_src)
pic.setPixmap(px)
picLine.addWidget(pic)
tried px.isNull()
- returns True
so px
is empty somehow
head of the python file:
# -*- coding: utf-8 -*-
from PyQt4 import QtGui, QtCore
import os, pyaudio, wave
setup.py:
from distutils.core import setup
import py2exe
setup(
name="name",
version="1",
author="Columpio",
windows=[{"script": "name.py",
"icon_resources": [(0, "icon.ico")]}],
data_files=[<here long list of files goes>],
options={"py2exe": {"includes": ["os", "sip", "sys", "PyQt4", "pyaudio",
"wave"],
"optimize": 2,
"bundle_files": 2
}
},
zipfile=None
)
Sorry for awful question style -- I'm very sick now.