otternase
2nd June 2010, 23:12
Hi
I'm searching for examples or hints which could help me finding a way to do this task:
In a table (or view) of a database items are managed, which are to be displayed in a QGraphicsScene. Each line in the table is one item on the GraphicsScene, the position being determined by X,Y columns of the table.
Now I want the database automatically updated when the item is moved on the canvas by the user and vice versa the view automatically updated when the database table changes. I guess this calls for a MVC-pattern. But I couldn't find any examples of SQL-models connected to a GraphicsScene as the View and Controller? Is this possible?
Every help appreciated
Markus
I'm searching for examples or hints which could help me finding a way to do this task:
In a table (or view) of a database items are managed, which are to be displayed in a QGraphicsScene. Each line in the table is one item on the GraphicsScene, the position being determined by X,Y columns of the table.
Now I want the database automatically updated when the item is moved on the canvas by the user and vice versa the view automatically updated when the database table changes. I guess this calls for a MVC-pattern. But I couldn't find any examples of SQL-models connected to a GraphicsScene as the View and Controller? Is this possible?
Every help appreciated
Markus