[Linux] What toolkit for a good grid/spreadsheet widget?

Phil Thompson phil at riverbankcomputing.co.uk
Fri Aug 4 04:25:07 EDT 2006


On Friday 04 August 2006 2:24 am, Vincent Delporte wrote:
> On Thu, 3 Aug 2006 22:07:04 +0100, Phil Thompson
>
> <phil at riverbankcomputing.co.uk> wrote:
> >PyQt4 has QTableWidget...
>
> Thx for the two pointers. Are those widgets more than just tables, ie.
> can I edit the contents, including displaying a combo box, can items
> be grouped or hierarchized, or are they just basic, read-only tables
> to display results?
>
> I need this kind of widget to build a 2+ column interface to let users
> type entries into the application as an alternative to MS Access-style
> complicated entry masks.

Yes you can edit cells. QTableWidget implements it's own data model. 
QTableView does the same but you supply the model - either a standard one or 
one you have written. A standard one is QSqlDataModel so creating a table 
that allows you to maintain the contents of an SQL table is about a dozen 
lines of Python.

Phil



More information about the Python-list mailing list