PDA

View Full Version : QTextBrowser doesn't display JPG's



Michael Druckenmiller Sr
9th April 2012, 22:55
This is a strange one...

I have a QTextBrowser in a pyQT (Python 2.7.2) application.

It works great and displays the .jpg fine on the development system.

However, when running in portable mode everything works except the display of the .jpg inside the QTextbrowser.

I suspect there is a Windows DLL somewhere that is missing.

Does anyone have a clue what this DLL might be.

We are trying not to have to install Python, pyQT and pyVISA on the target system to avoid Information Assurance issues.

Any ideas would be greatly appreciated.

Thanks!

Lykurg
9th April 2012, 23:17
You are missing the jpeg image plugin. See inside the imageplugins folder inside plugins.

Michael Druckenmiller Sr
10th April 2012, 14:05
For some reason, my earlier post this morning didn't take?

Anyway...

The jpeg plug-in wasn't missing.

But, that clue set me on the right path to solve the problem.

When pyQT is installed it creates to copies of a file qt.conf

These files are located in your Python root and Lib/site-packages/PyQt4/

They can be edited with Notepad and need to point to the actual location of the PyQt4 files.

In my case the path became: /App/Lib/site-packages/PyQt4

/App is a copy of my entire Python 2-7-2 install folder.

Hope this helps anyone else trying to run PyQy Portable...