[PyQt] PyQt5.5.1

Phil Thompson phil at riverbankcomputing.com
Fri Sep 25 09:59:28 BST 2015


On 24 Sep 2015, at 11:23 pm, Simon Dible <simon.dible at gmail.com> wrote:
> 
> Hi,
> 
> I'm just playing around with building pyqt for android target from a windows host. I have created a .ui based QMainWindow application, that has a menu bar a few buttons and a few labels with pixmaps setup, and uses bluetooth low energy. I have the graphics specified as filesystem paths instead of resources as suggested on pyqt.sourceforge.net/Docs/pyqtdeploy/pyrcc.html  On windows and linux the graphics load fine, but on android they don't appear to load, but the application works jsut fine.

Do you mean a pyqtdeployed application works on Windows and Linux or a "normal" application?

> The code for my icons is
> root = QtCore.QFileInfo(__file__).absolutePath()
> ...
> icon = QtGui.QIcon()
> icon.addPixmap(QtGui.QPixmap(_root + "/resources/ic_launcher.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
> myMain.setWindowIcon(icon)
> 
> ....
> 
> self.label_2.setText("")
> self.movie = QtGui.QMovie(_root + "/resources/animation.gif");
> self.label_2.setMovie(self.movie);
> 
> I tried using QFileInfo to list the path to the path to the files and they are there. The path is :/resources/animation.gif
> 
> Any suggestions on what I'm doing wrong or what else I could try? 
> 
> Is there anyway to debug the python code when its running on android, or do I just have to use linux and hope it just works (other than print statements)?
> 
> Thanks
> Simon
> 
> p.s. pyqtdeploy needs an option for specifying the spec file to use with qmake when its building a static pyqt5,  the same as sip already has, by default it wanted to use msvc-2010 on me when I have win32-g++, took me a while to work around that one. 

PyQt5's configure.py has a --spec option.

Phil


More information about the PyQt mailing list