[Qt-interest] What classes will i need?
Usman Ajmal
uzmanajmal at gmail.com
Mon Jul 6 13:54:29 CEST 2009
Yeah my textual info is in the form of list so ListView will work for me.
Thanks a lot Krizka.
On Mon, Jul 6, 2009 at 4:48 PM, Karol Krizka <kkrizka at gmail.com> wrote:
> On Mon, 2009-07-06 at 13:43 +0500, Usman Ajmal wrote:
> > Hi,
> >
> > I want to develop an application having following requirements. I just
> > want to know your suggestions especially about classes of QT that i
> > will need for my req.
> >
> > 1. I want to have two panes in my app. One in which textual info will
> > appear and the other (relatively wider than the earlier pane) in which
> > clickable-rectangles will appear.
> > 2. The number of rectanges is read from a file i.e. they are not
> > already drawn but will be shaped dynamically when the application
> > executes.
> > 3. Whenever any of the rectangles is clicked, textual info related to
> > that rectangle (read from a file) is to appear in the textual pan.
> > 4. Text to appear on rectangles too like e.g. their names.
> >
> > What i think:
> > a. I think i will need QPainter for drawing rectangles but don't know
> > if i can make them clickable.
> > b. From Qt designer i have selected 'List View' for my textual
> > pane...and 'Graphics View' for my rectangles-pane. Am i right?
> > c. Don't know whether the Graphics View options is correct or should i
> > go for making a new widget and then use QPainter to draw
> > clickable-rectangles in that widget.
> >
> I think that sounds about right. Use GraphicsView
> (http://doc.qtsoftware.com/4.5/graphicsview.html ) for the rectangles.
> It supports drawing stuff (rectangles, circles, text, widgets...) and
> handling mouse events.
>
> As for the textual info, it depends how the text is organized. But
> QListView looks like one of the classes you might want to try out.
>
> --
> Cheers,
> Karol Krizka
> http://www.krizka.net
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090706/1025bf41/attachment.html
More information about the Qt-interest-old
mailing list