[PyQt] PyQt5.5.1

Simon Dible simon.dible at gmail.com
Fri Sep 25 12:22:47 BST 2015


On 25/09/2015 09:59, Phil Thompson wrote:
> 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?
I mean a normal, non-deployed application. I'm unable to make a deployed 
application for windows, the deployment works, but then I hit some 
compiler errors building the c++,  I think its assuming msvc if windows 
and I'm using mingw so some headers don't match, but I haven't dug into 
this yet and I'm not at home to post the error string.  To answer 
another post I did see the Cannot open include file QApplication, i just 
found Qapplication manually and copied over the header include from 
within that file manually.

I'll try on Linux (hopefully that just works) and report back later, 
unless you have any suggestions. Are there any deployment examples 
around I could try with my build setup?
>> 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.
Sorry my mistake, I saw it for sip and missed it for pyqt5

>
> Phil



More information about the PyQt mailing list