[Qt-interest] QtMonoDB table model
David Boddie
david.boddie at nokia.com
Mon Dec 6 14:15:59 CET 2010
Martin Holst Swende wrote:
> I don't want to reinvent the wheel, and I think that a MongoDBTableModel
> could probably reuse a lot from the SQL-libraries. Where can I find the
> source code for them? I am a bit new to the c-side of Qt (coming
> straight from PyQt and have never written a line of "pure" Qt.)
If you haven't already seen it, you might want to take a look at the
DbAPICursorModel class in this collection of examples (in the
sqlcursorview.py example):
http://pypi.python.org/pypi/EuroPython2006_PyQt4_Examples/1.0
I didn't write it, and haven't looked very closely at the source code for
it, but it might help you get started with writing your own model.
An alternative is to look for an existing Python DBAPI adaptor for MongoDB
and build on the DbAPICursorModel model to add the features you need.
David
--
David Boddie
Senior Technical Writer
Nokia, Qt
More information about the Qt-interest-old
mailing list