[Qt-interest] sketcher program
Mihail Naydenov
mlists at ymail.com
Sat May 7 11:41:02 CEST 2011
Define "data duplication"? You can aways "bake" information - draw an item
yourself, instead of using lots and lots of items (in which GS is actually very
good at).
MihailNaydenov
----- Original Message ----
> From: phil prentice <philp.cheer at talktalk.net>
> To: qt-interest at qt.nokia.com
> Sent: Sat, May 7, 2011 10:13:48 AM
> Subject: Re: [Qt-interest] sketcher program
>
> Having now had a bit more of a read, I now realise that I should use the
> QGraphicsView class. I think that I got side-tracked by the Model-View
> architecture. because I wanted to understand it a lot more. However it looks
> like the QGraphicsView class will do most of what I need. I still have one
> question. It looks like that I will need to create a scene with loads of QT
> graphics items in it. Suppose I have a database (e.g. a garden design) which
> has loads of other information in it (plant types, soil types etc) would this
> mean that you would end up with data duplication i.e. each item would hold
> duplicate data of element positioning as your main database. Is that just
> something that you would except as part of the design? I think the answer is
> probably yes, because as a result you get the extra functionality of the
> graphics items? As a result though if your database is massive then there
> would be a lot of data duplication. Anyway I will start writing the app
> using the QGraphicsView class.
>
> Thanks again
>
>
> On Friday 06 May 2011 20:03, phil prentice wrote:
> > Hi
> > Recently I have been looking at an MFC example of a program that lets you
> > draw lines, circles, polylines etc in an MDI. As a little exercise for
> > myself I have decided to try to perform the same functionality using Qt.
> > (I know its probably already been done, but I would like to go through the
> > exercise myself to try and learn!!)
> > I have some very basic questions about the model view architecture.
> > And I need to read a lot more.
> > I would eventually like to create a Model view (QStandardItem model or a
> > custom model), but to start with I thought that I might try and use the
> > item view conveniance classes.
> >
> > I was thinking of using QListWidget.
> > I was thinking of deriving an element base class from QListWidgetItem and
> > then deriving line, circle etc from the element base(using a virtual draw
> > function for each element)
> >
> > I would then use setItemDelegate for editing/displaying the elements.
> >
> > Is this a stupid idea?
> > Would this be very inefficient?
> >
> > I know that QListWidget is normally used to store text and icons, so if I
> > extend it like this its probably not the way to do things?
> >
> > Thanks
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at qt.nokia.com
> > http://lists.qt.nokia.com/mailman/listinfo/qt-interest
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list