I am relatively new to database GUI programming, and I want to make a simple app in Python, which allows user to access and edit database. I want to view/edit tables and specific records plus generate some specific reports about stored data. For example, if we have a table with employees name and position, it should allow to edit name and select position from list and immediately change database according to changes. For one employee record it should output name and, again give a selectable list of positions. Also, it should have a dialog to add employees.

So, is there a way to create widgets for data tables and specific records which allows to output and edit data with automatic changes in database? I want to reduce the need for writing methods, which look at changes in view and reflect them at model.

I am using PyQt for writing GUI. Solutions for SQL, or ORMs like SQLAlchemy would both be fine.

有帮助吗?

解决方案

You can use the Qt Database GUI Layer.
If you want to use SQLAlchemy too, you can take a look at Camelot.

UPDATE
A good introduction to the Qt Database GUI Layer is chapter 15 of the book "Rapid GUI Programming with Python and Qt".

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top