Author Topic: Two More Python/pyqt Issues I Found...  (Read 4639 times)

fpp

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://
Two More Python/pyqt Issues I Found...
« on: March 18, 2005, 04:27:56 pm »
Well, thanks to the help of all here my problem with zlib is finally solved... so I get to see entirely new exceptions when I launch TreeLine, yay :-)

First, I found that the "locale" subsystem on the Z (Cacko 1.21) does not seem to like the standard python idiom :

import locale
locale.setlocale(locale.LC_ALL, '')

(dies with: "locale.Error: unsupported locale setting")

The only syntax I could get to run was locale.setlocale(locale.LC_ALL) (no locale parameter). This required changes to the app's code but also in locale.py.

After that the app finally got around to importing some stuff from the qt package... and stopped right there on the first line, with :

ImportError: unable to import name QColorDialog
(and also QInputDialog, and probably others)

What I'm wondering here is whether this is just a naming issue (like the QApplication vs QPEApplication thing) or a deeper mismatch between the versions of Qt/PyQT used by the app's author and those available on the Z. His app works with the old freeware version of Qt for Windows though, so it's not *that* sensitive...

In other words : is it hopeless to want to port an existing, non-trivial PyQt app to the Zaurus, and is the Z's (Py)Qt only useful for developing from scratch on itself ?

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Two More Python/pyqt Issues I Found...
« Reply #1 on: March 22, 2005, 11:59:44 pm »
Quote
What I'm wondering here is whether this is just a naming issue (like the QApplication vs QPEApplication thing) or a deeper mismatch between the versions of Qt/PyQT used by the app's author and those available on the Z. His app works with the old freeware version of Qt for Windows though, so it's not *that* sensitive...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=71337\"][{POST_SNAPBACK}][/a][/div]

The problem is the latter. The "problem" is that Qt Embedded (the version of Qt upon which Qtopia is built) can have individual classes excluded from the libraries to reduce the memory footprint. Sharp was fairly aggressive in that respect and took out some rather useful things like standard dialogs, network socket classes, etc.

If you are trying to port a PyQt app that really uses the full richness of Qt, then you have your work cut out for you. Naturally you can code up your own dialogs to replace those that are missing, but that's certainly non-trivial.