Reply
Thread Tools
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#1
I guess this one's for Attila :-)

On my N810 running Diablo I have the following packages I got from the "standard" repos with HAM :

Python 2.5.2
Qt 4.5.3
PyQt snapshot-4.7.1-50147fc72a58

I have two questions really :

1) is this the latest and greatest there is ? Nothing hidden away under some rug ? :-)

2) I have tried to run code made for the N900 (QT 4.6.2, PyQt 4.7.5), like the excellent GReader and some of my own. Apart from the Fremantle-specific APIs (which is normal) there at least is one other thing it chokes on, in both cases : QLineEdits on which setInputMethodHints has been used by designer.

That's actually a QWidget method, so I don't know if the problem happens only with line edits ("object has no method called...").

If I comment out those lines in the UI files, the rest of the code runs fine -- not pretty, but working :-)

Has this method been added since Qt 4.5.3 ?

Oh, and a third one : is there a Maemo4 API somewhere to make less ugly apps with PyQt ?... :-)

TIA
fpp
__________________
maemo blog
 
jkq's Avatar
Posts: 251 | Thanked: 131 times | Joined on Oct 2009 @ USA
#2
Originally Posted by fpp View Post
2) I have tried to run code made for the N900 (QT 4.6.2, PyQt 4.7.5), like the excellent GReader and some of my own. Apart from the Fremantle-specific APIs (which is normal) there at least is one other thing it chokes on, in both cases : QLineEdits on which setInputMethodHints has been used by designer.

That's actually a QWidget method, so I don't know if the problem happens only with line edits ("object has no method called...").

If I comment out those lines in the UI files, the rest of the code runs fine -- not pretty, but working :-)

Has this method been added since Qt 4.5.3 ?
I believe so. I had the same problem while playing around with Qt for an app I wrote. I was using it to change which set of characters showed up in the Fremantle OSK when it came up (numbers vs letters).

-jkq
__________________
Class .. : Quiet One
Humor .. : [*********-] Alignment: Chaotic Good
Patience : [******----] Weapon(s): Python scripts
Agro ... : [***-------] Relic(s) : N900
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#3
Originally Posted by fpp View Post
On my N810 running Diablo I have the following packages I got from the "standard" repos with HAM :

Python 2.5.2
Qt 4.5.3
PyQt snapshot-4.7.1-50147fc72a58

I have two questions really :

1) is this the latest and greatest there is ? Nothing hidden away under some rug ? :-)
Nope, sadly, that's about it. I could push a newer PyQt but without the newer Qt, the changes are minimal, mostly limited to bugfixes and a little syntactic sugar, no real functional differences :\

2) I have tried to run code made for the N900 (QT 4.6.2, PyQt 4.7.5), like the excellent GReader and some of my own. Apart from the Fremantle-specific APIs (which is normal) there at least is one other thing it chokes on, in both cases : QLineEdits on which setInputMethodHints has been used by designer.

That's actually a QWidget method, so I don't know if the problem happens only with line edits ("object has no method called...").
Not sure I follow - is the problem that you are compiling with the 4.7.5 pyuic ? Does it happen if you use the corresponding 4.7.1 Diablo pyuic, too ?

Has this method been added since Qt 4.5.3 ?

Oh, and a third one : is there a Maemo4 API somewhere to make less ugly apps with PyQt ?... :-)
Qt4.6 port has been a rewrite (the port, not Qt), so most of the Maemo specifics - esp regarding input methods end events - are done differently, which has all sorts of implications. Q4.5 was more of a tech demonstrator, to show Qt could actually run, and also a lot of the Hildon finger/look goodies came later so there was a lot less to 'build on' at the time of 4.5. This is also the reason why, real, good lookin' 4.6 or 4.7 on N8x0 is not a trivial thing - it relies quite a bit on Fremantle parts to actually look/behave as it does - and those are simply not present on Diablo.
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 

The Following User Says Thank You to attila77 For This Useful Post:
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#4
Originally Posted by attila77 View Post
Nope, sadly, that's about it. I could push a newer PyQt but without the newer Qt, the changes are minimal, mostly limited to bugfixes and a little syntactic sugar, no real functional differences :\
Okay, thanks for the confirmation... just wanted to make sure :-)

Qt4.6 port has been a rewrite (the port, not Qt), so most of the Maemo specifics - esp regarding input methods end events - are done differently, which has all sorts of implications. Q4.5 was more of a tech demonstrator, to show Qt could actually run, and also a lot of the Hildon finger/look goodies came later so there was a lot less to 'build on' at the time of 4.5. This is also the reason why, real, good lookin' 4.6 or 4.7 on N8x0 is not a trivial thing - it relies quite a bit on Fremantle parts to actually look/behave as it does - and those are simply not present on Diablo.
Ditto, understood !

Not sure I follow - is the problem that you are compiling with the 4.7.5 pyuic ? Does it happen if you use the corresponding 4.7.1 Diablo pyuic, too ?
Erm... I must admit that didn't even occur to me :-)

I just tend to copy the whole lot over and see what happens. So yes, the UI files were done with the newer pyuic. I'll give it a try, just for kicks...
__________________
maemo blog
 

The Following User Says Thank You to fpp For This Useful Post:
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#5
OK, reality check report... What I did :

On the N810,

- deleted the offending Ui_xxxx.py

- used the pyuic4.py from the PyQt 4.7.1 snapshot on the original xxxx.ui file (the one made with the Qt 4.6.2 Designer, with the inputHints in the XML)

- generated a new Ui_xxxx.py

The inputHints for the line edit are back in the Python code. So it seems commenting them out after the fact is the only workaround.

Is that what you wanted to verify ?
__________________
maemo blog
 

The Following User Says Thank You to fpp For This Useful Post:
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#6
Hm, it seems that pyuic is not too smart then (i.e. it doesn't really know/do anything about what version of Qt it was originally built with). In that case, not much help - a newer PyQt would probably make the same mistake, as it would happily translate the 4.6.2 design into non-4.5 compatible ui_...py files.
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#7
Yup. Well, at least the manual fix is easy :-)
__________________
maemo blog
 
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#8
Originally Posted by attila77 View Post

Oh, and a third one : is there a Maemo4 API somewhere to make less ugly apps with PyQt ?... :-)
Qt4.6 port has been a rewrite (the port, not Qt), so most of the Maemo specifics - esp regarding input methods end events - are done differently, which has all sorts of implications. Q4.5 was more of a tech demonstrator, to show Qt could actually run, and also a lot of the Hildon finger/look goodies came later so there was a lot less to 'build on' at the time of 4.5. This is also the reason why, real, good lookin' 4.6 or 4.7 on N8x0 is not a trivial thing - it relies quite a bit on Fremantle parts to actually look/behave as it does - and those are simply not present on Diablo.
Reviving this old thread because this last part was lost while discussing the rest...

My wording was bad. I guess I wasn't so much thinking of a *Qt* Maemo4 API, like Fremantle has... but more like coding hacks or good practice that could make a Qt4.5 app feel more at home in Diablo, and not stand out so much as a ported desktop app.

Are there any examples of PyQt apps tweaked specifically for use on a N8x0 out there ?
__________________
maemo blog
 
Reply


 
Forum Jump


All times are GMT. The time now is 11:15.