Hello,

I've got hold of a barcode laser scanner and started to write a tool to
scan my large DVD, book and comic collection. It's written in Python and
PyQt4. The announcement can be found in my blog:

http://darkviews.blogspot.com/2008/10/upcscan-06-its-qt-man.html

If you're looking for an example how to implement a live UI, this might
be for you. A list of features:

- A Pythonic(tm) table model. The model is based on a Python list. The
list contains Python objects and the model translates the columns into
attribute accesses. The most important missing feature is that the model
doesn't listen to list modifications.

- The model uses a proxy for sorting and filtering (the latter is not
implemented ATM).

- I'm saving all changes in the UI into a sqlite3 database which runs in
a background thread. When you type faster than the DB can write the
changes to disk, requests will be merged (if you send a second request
to the database to update the same thing, the first request will be
canceled). This makes the UI responsive while it's still not possible to
lose even a single keystroke when the computer crashes (unless the
filesystem is corrupt afterwards :)

- It shows how to save and retrieve binary data (cover images) to/from
an sqlite3 database and how to convert the bytes into QImage, QPixmap
and QIcon.

- It demonstrates how to write a script which runs in console-only-mode
if PyQt4 is not installed.

- The database is versioned and there is code to migrate the database
from version to version.

Feedback welcome :) Let me know if you're interested to put this code
somewhere as an example (a PyQt book, a wiki, whatever).

Regards,

-- 
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://darkviews.blogspot.com/          http://www.pdark.de/
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to