Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, February 2008
How to represent associations using model view?


Message 1 in thread

Hi Everybody, 

Another Delphi conversion question... 

Delphi datasets allow fields to be declared as a sub-dataset. Normally, the field appears in a grid with a small button on the right hand side with three dots. When clicked, it opens up a popup grid with the sub-dataset showing only the detail records relevant to the master row. 

How should I approach this in Qt? Is there even a database example with more than one record type? 

In general how should UML associations be represented in model/view? Should I have a super-model that knows about the different record types? Or use the standard SQL models for each record type and a proxy to tie them all together. 

Sorry if this topic is too general, but I'm finding that the model view stuff sounds great when I read the doco, but seems to only handle trivial data models in practice? 

Borland have a UML modeling system called ECO that generates database classes from a UML model. What do people in Qt land use? My model has about 40 classes in it and lots of associations. In 2008, I shouldn't have to code all of this by hand! 

I am converting a Delphi application to Qt in order for it to run on Mac, as well as Windows. Hence the conversion from Borland to Qt. 

Many thanks in advance. 

Tony Rietwyk. 

--
 [ signature omitted ]