[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Fw: Re: [PyQt] PyQt4.uic Error!!..
From: Aminu D <imat03 () yahoo ! co ! uk>
Date: 2008-08-28 2:11:09
Message-ID: 142037.84092.qm () web23204 ! mail ! ird ! yahoo ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
I was wondering if you have ever done this before and how much of the converted \
code did you have to edit?...Its hard for me to phrase this question properly, but I \
give it a shot...
The converted code ie "myconvertedcode.py" contains:
a class: ie "convertClass"...This class has two functions:
def setupUi(self, someobject)
def retranslateUi(self, someobject)
Now what I know is that uic.load() returns a QtGui object that you can easily use. So \
if I did myobj = uic.loadUi("myUi")....I can easily go ahead and do \
myObj.somewidget.show()
But I'm not sure what I get, after I import say "myconvertedcode", when I do myobj = \
myconvertedcode.convertClass...I'm finding it hard to access any of the widgets in \
the initial Gui by using myObj.somewidget.show() etc.
I hope you can make out what I'm trying to say, you can ask me any questions for \
clarity, bottom line is I'm not exactly sure how to use the converted code in the \
main program that used to do the Ui load. I've seen some examples for sub classing \
the class created in the python code but they I can seem to get them to work. Any \
help will be appreciated.
----- Original Message ----
From: "projetmbc@club-internet.fr" <projetmbc@club-internet.fr>
To: imat03@yahoo.co.uk
Sent: Wednesday, 27 August, 2008 6:50:56 AM
Subject: Re: Re: [PyQt] PyQt4.uic Error!!..
Flashmail
Yes that's what I meant.
You can do this conversions easily by using mkpyqt.py. This script is the file \
pyqtbook.zip that is downloadable at http://www.qtrac.eu/pyqtbook.html.
Best regards.
BAL Christophe.
----Message d'origine----
Date: Tue, 26 Aug 2008 19:58:35 +0000 (GMT)
De: Aminu D
Sujet: Re: [PyQt] PyQt4.uic Error!!..
A: projetmbc@club-internet.fr
Hello,
Thanks for your reply and help, I'm not sure I understand what you mean by a \
"python version of my GUI" do you mean a full implementation of my GUI in \
python?...I'm pretty sure that would work but that would be an extreme pain to do \
right now so I'm looking for an "easy way" out. I am however looking to use pyuic to \
convert my Qt ui files to python code but I'm open to new any new suggestions though. \
----- Original Message ----
From: "projetmbc@club-internet.fr" <projetmbc@club-internet.fr>
To: imat03@yahoo.co.uk
Sent: Tuesday, 26 August, 2008 11:18:32 AM
Subject: Re: [PyQt] PyQt4.uic Error!!..
Hello,
I think you should use Python versions of your GUI. Have you tried that ?
----Message d'origine----
> Date: Tue, 26 Aug 2008 14:48:02 +0000 (GMT)
> De: Aminu D
> Sujet: [PyQt] PyQt4.uic Error!!..
> A: pyqt@riverbankcomputing.com
> mailto:pyqt-request@riverbankcomputing.com?subject=unsubscribe
> mailto:pyqt-request@riverbankcomputing.com?subject=subscribe
>
> I tried down grading to the same versions as in Ubuntu and I could load my ui \
> files, however the script runs painfully slow. This leads me to believe that \
> porting
python scripts that use certain qt functionality isn't fully supported. Does anyone \
know another way to load Qt ui files on windows?. Please specify the versions of all \
the packages involved. Thanks.
>
>
>
> ----- Forwarded Message ----
> From: Aminu D
> To: pyqt@riverbankcomputing.com
> Sent: Monday, 25 August, 2008 1:31:48 PM
> Subject: [PyQt] PyQt4.uic Error!!..
>
>
> Hi,
> I installed PyQt4 and Python on windows and tried to
run
> a script that I have tested and ran on Ubuntu. When I try to run my
> script, at the point were I try to load a ui file...ie : uifile =
> uic.loadUi("MyUIFile.ui"), it always gives me an attribute error that
> occurred in the icon_cache.py library file "AttributeError: 'NoneType'
> object has no attribute 'replace'" in __init__ when it tried to execute
> > "self._roles[i.tag] = i.text.replace("\\", "\\\\")" . This script
> works fine on Ubuntu, and being that
the Qt ui files are xml, I thought
> it would be trivial to port it to windows. Below is the list of packages I'm \
> running on each OS. Windows has the most up to date packages. On windows:
> PyQt is 4.4.3-1, Qt is version 4.4.1, and python is version 2.5
> On Ubuntu (8.04):
> PyQt is 4.3.3-2, Qt is 4.4.0, Python is version 2.5.2-0
>
> I haven't made any changes
> to any of the libraries and therefore don't understand, why I am
> getting this error. I
apologize if my problem is not clear enough but
> would appreciate all the help I can get, please feel free to ask any question for
> clarity. Thank you for your time.
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
> _______________________________________________
> PyQt mailing list PyQt@riverbankcomputing.com
> http://www. riverbankcomputing.
com/mailman/listinfo/pyqt
> _______________________________________________
> PyQt mailing list PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
Send instant messages to your online friends http://uk.messenger.yahoo.com
Send instant messages to your online friends http://uk.messenger.yahoo.com
Send instant messages to your online friends http://uk.messenger.yahoo.com
[Attachment #5 (text/html)]
<html><head><style type="text/css"><!-- DIV {margin:0px;} \
--></style></head><body><div style="font-family:times new roman, new york, times, \
serif;font-size:12pt">Hi, <br><div style="font-family: times new roman,new \
york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new \
york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new \
york,times,serif; font-size: 12pt;"><div><br> I was wondering if you have ever \
done this before and how much of the converted code did you have to edit?...Its hard \
for me to phrase this question properly, but I give it a shot...<br><br>The converted \
code ie "myconvertedcode.py" contains:<br> a class: ie \
"convertClass"...This class has two functions:<br> \
def setupUi(self, \
someobject)<br> def \
retranslateUi(self, someobject) <br><br>Now what I know is that uic.load() returns a \
QtGui object that you can easily use. So if I did myobj = uic.loadUi("myUi")....I can \
easily go ahead and do myObj.somewidget.show()<br><br>But I'm not sure what I get, \
after I import say "myconvertedcode", when I do myobj = \
myconvertedcode.convertClass...I'm finding it hard to access any of the widgets in \
the initial Gui by using myObj.somewidget.show() etc.<br><br>I hope you can \
make out what I'm trying to say, you can ask me any questions for clarity, bottom \
line is I'm not exactly sure how to use the converted code in the main program that \
used to do the Ui load. I've seen some examples for sub classing the class created in \
the python code but they I can seem to get them to work. Any help will be \
appreciated.<br></div><div style="font-family: times new roman,new york,times,serif; \
font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; \
font-size: 12pt;">----- Original Message ----<br>From: "projetmbc@club-internet.fr" \
<projetmbc@club-internet.fr><br>To: imat03@yahoo.co.uk<br>Sent: Wednesday, 27 \
August, 2008 6:50:56 AM<br>Subject: Re: Re: [PyQt] PyQt4.uic \
Error!!..<br><br><title>Flashmail</title>
<style type="text/css">
BODY, TABLE, TR, TD, P {margin:0;padding:0;}
BODY {background:#FFFFFF;}
</style> <p>Yes that's what I meant.</p><p> </p><p>You can do this conversions \
easily by using mkpyqt.py. This script is the file pyqtbook.zip that is downloadable \
at <a rel="nofollow" target="_blank" \
href="http://www.qtrac.eu/pyqtbook.html">http://www.qtrac.eu/pyqtbook.html</a>.</p><p> </p><p>Best \
regards.</p><p>BAL Christophe.</p><p><br>----Message d'origine----<br>Date: Tue, 26 \
Aug 2008 19:58:35 +0000 (GMT)<br>De: Aminu D <br>Sujet: Re: [PyQt] PyQt4.uic \
Error!!..<br>A: projetmbc@club-internet.fr<br><br></p><div style="font-size: 12pt; \
font-family: times new roman,new york,times,serif;"><div style="font-size: 12pt; \
font-family: times new roman,new york,times,serif;"><div style="font-size: 12pt; \
font-family: times new roman,new york,times,serif;">Hello,<br><br> Thanks \
for your reply and help, I'm not sure I understand what you mean by a "python version \
of my GUI" do you mean a full implementation of my GUI in python?...I'm pretty sure \
that would work but that would be an extreme pain to do right now so I'm looking for \
an "easy way" out. I am however looking to use pyuic to convert my Qt ui files to \
python code but I'm open to new any new suggestions though. <br><br><div \
style="font-size: 12pt; font-family: times new roman,new york,times,serif;">----- \
Original Message ----<br>From: "projetmbc@club-internet.fr" \
<projetmbc@club-internet.fr><br>To: imat03@yahoo.co.uk<br>Sent: Tuesday, 26 \
August, 2008 11:18:32 AM<br>Subject: Re: [PyQt] PyQt4.uic Error!!..<br><br><style \
type="text/css"> BODY, TABLE, TR, TD, P {margin:0;padding:0;}
BODY {background:#FFFFFF;}
</style> <p>Hello,</p><p>I think you should use Python versions of your GUI. Have \
you tried that ?</p><p><br>----Message d'origine---- <br>>Date: Tue, 26 Aug 2008 \
14:48:02 +0000 (GMT) <br>>De: Aminu D <br>>Sujet: [PyQt] PyQt4.uic Error!!.. \
<br>>A: pyqt@riverbankcomputing.com <br>> \
mailto:pyqt-request@riverbankcomputing.com?subject=unsubscribe <br>> \
mailto:pyqt-request@riverbankcomputing.com?subject=subscribe <br>> <br>>I tried \
down grading to the same versions as in Ubuntu and I could load my ui files, however \
the script runs painfully slow. This leads me to believe that porting python scripts \
that use certain qt functionality isn't fully supported. Does anyone know another way \
to load Qt ui files on windows?. Please specify the versions of all the packages \
involved. Thanks. <br>> <br>> <br>> <br>>----- Forwarded Message ---- \
<br>>From: Aminu D <br>>To: pyqt@riverbankcomputing.com <br>>Sent: Monday, \
25 August, 2008 1:31:48 PM <br>>Subject: [PyQt] PyQt4.uic Error!!.. <br>> \
<br>> <br>>Hi, <br>> I installed PyQt4 and Python on windows and tried to \
run <br>>a script that I have tested and ran on Ubuntu. When I try to run my \
<br>>script, at the point were I try to load a ui file...ie : uifile = \
<br>>uic.loadUi("MyUIFile.ui"), it always gives me an attribute error that \
<br>>occurred in the icon_cache.py library file "AttributeError: 'NoneType' \
<br>>object has no attribute 'replace'" in __init__ when it tried to execute \
<br>>: "self._roles[i.tag] = i.text.replace("\\", "\\\\")" . This script \
<br>>works fine on Ubuntu, and being that the Qt ui files are xml, I thought \
<br>>it would be trivial to port it to windows. Below is the list of packages I'm \
running on each OS. Windows has the most up to date packages. <br>>On windows: \
<br>>PyQt is 4.4.3-1, Qt is version 4.4.1, and python is version 2.5 <br>>On \
Ubuntu (8.04): <br>>PyQt is 4.3.3-2, Qt is 4.4.0, Python is version 2.5.2-0 \
<br>> <br>>I haven't made any changes <br>>to any of the libraries and \
therefore don't understand, why I am <br>> getting this error. I apologize if my \
problem is not clear enough but <br>>would appreciate all the help I can get, \
please feel free to ask any question for <br>>clarity. Thank you for your time. \
<br>>Send instant messages to your online friends http://uk.messenger.yahoo.com \
<br>> <br>>Send instant messages to your online friends \
http://uk.messenger.yahoo.com <br>>_______________________________________________ \
<br>>PyQt mailing list PyQt@riverbankcomputing.com <br>>http://www. \
riverbankcomputing. com/mailman/listinfo/pyqt \
<br>>_______________________________________________ <br>>PyQt mailing list \
PyQt@riverbankcomputing.com \
<br>>http://www.riverbankcomputing.com/mailman/listinfo/pyqt <br>> \
</p></div></div></div></div><br>Send instant messages to your online friends \
http://uk.messenger.yahoo.com </div></div></div><br>Send instant messages to your \
online friends http://uk.messenger.yahoo.com </div></div></div><br>Send instant \
messages to your online friends http://uk.messenger.yahoo.com </body></html>
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic