| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 5 | |
I need a Qt class, but I don't really know what it would be called. It's like a list box in which can be displayed many different fields per record. I want to be able to read in a phone number, name, and address information from a database and then display it in this widget. Does a widget like this exist in Qt? If so, what is it called? -Michael Sullivan- -- [ signature omitted ]
Try QListView or QListWidget. Maybe QTableView might do some of what you're looking for, as well. You might also have a look at QSqlTableModel and friends. Cheers, Darrik Michael Sullivan wrote: > I need a Qt class, but I don't really know what it would be called. > It's like a list box in which can be displayed many different fields per > record. I want to be able to read in a phone number, name, and address > information from a database and then display it in this widget. Does a > widget like this exist in Qt? If so, what is it called? > -Michael Sullivan- > > -- > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body. > List archive and information: http://lists.trolltech.com/qt-interest/ > -- [ signature omitted ]
If I understand what you are asking, I use a QTreeView for that sort of display. Not quite the proper use, perhaps, but it does display all of the columns without splitting them into individual cells like the QTableView does, such that you can click and get the entire row selected, alternating line colors (if you want them) etc. ----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service Inc. 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x293 ----------------------------------------------- On Sep 26, 2007, at 11:06 AM, Michael Sullivan wrote: > I need a Qt class, but I don't really know what it would be called. > It's like a list box in which can be displayed many different > fields per > record. I want to be able to read in a phone number, name, and > address > information from a database and then display it in this widget. > Does a > widget like this exist in Qt? If so, what is it called? > -Michael Sullivan- > > -- > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx > with "unsubscribe" in the subject or the body. > List archive and information: http://lists.trolltech.com/qt-interest/ -- [ signature omitted ]
Israel Brewster wrote: > If I understand what you are asking, I use a QTreeView for that sort of > display. Not quite the proper use, perhaps, but it does display all of > the columns without splitting them into individual cells like the > QTableView does, such that you can click and get the entire row > selected, alternating line colors (if you want them) etc. You can do both full-row selection and alternating line colors with QTableView. Darrik > On Sep 26, 2007, at 11:06 AM, Michael Sullivan wrote: > >> I need a Qt class, but I don't really know what it would be called. >> It's like a list box in which can be displayed many different fields per >> record. I want to be able to read in a phone number, name, and address >> information from a database and then display it in this widget. Does a >> widget like this exist in Qt? If so, what is it called? >> -Michael Sullivan- -- [ signature omitted ]
On Sep 26, 2007, at 11:59 AM, Darrik Mazey wrote: > Israel Brewster wrote: >> If I understand what you are asking, I use a QTreeView for that >> sort of display. Not quite the proper use, perhaps, but it does >> display all of the columns without splitting them into individual >> cells like the QTableView does, such that you can click and get >> the entire row selected, alternating line colors (if you want >> them) etc. > > You can do both full-row selection and alternating line colors with > QTableView. > > Darrik True, although admittedly I had missed that fact at first, thus the reason i've been using QTreeViews instead. However, that said, I personally think the QTreeView gives a much cleaner display if you don't want the vertical header, unless there is another option to remove the vertical header from the QTableView. Consider, for example the attached screen shot of the same dataset displayed on the left with a QTableView and the right with a QTreeView. The horizontal lines on the QTreeView are only about 2/3 as high as on the QTableView, making a much more compact display that can show more records. Course, there may be some configuration options on the QTableView that would allow a similar display, but no configuration was needed to get the QTreeView like this. There is also the fact that the QTreeView looks the same as the QListView, except with multiple columns, as the OP seemed to indicate they wanted. Boils down to personal preference, I guess :) ----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service Inc. 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x293 -----------------------------------------------
Attachment:
Attachment:
ViewCompare.png
Description: application/applefile>> On Sep 26, 2007, at 11:06 AM, Michael Sullivan wrote:
>>> I need a Qt class, but I don't really know what it would be called.
>>> It's like a list box in which can be displayed many different
>>> fields per
>>> record. I want to be able to read in a phone number, name, and
>>> address
>>> information from a database and then display it in this widget.
>>> Does a
>>> widget like this exist in Qt? If so, what is it called?
>>> -Michael Sullivan-
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
Message 6 in thread
Israel Brewster wrote:
> True, although admittedly I had missed that fact at first, thus the
> reason i've been using QTreeViews instead. However, that said, I
> personally think the QTreeView gives a much cleaner display if you don't
> want the vertical header, unless there is another option to remove the
> vertical header from the QTableView. Consider, for example the attached
> screen shot of the same dataset displayed on the left with a QTableView
> and the right with a QTreeView. The horizontal lines on the QTreeView
> are only about 2/3 as high as on the QTableView, making a much more
> compact display that can show more records. Course, there may be some
> configuration options on the QTableView that would allow a similar
> display, but no configuration was needed to get the QTreeView like this.
> There is also the fact that the QTreeView looks the same as the
> QListView, except with multiple columns, as the OP seemed to indicate
> they wanted. Boils down to personal preference, I guess :)
I agree completely, and also prefer QTreeView to QTableView in a lot of
cases. I was merely throwing that in there in case you missed it and
were only avoiding QTableView for that reason. :)
Cheers,
Darrik
--
[ signature omitted ]
Message 7 in thread
On Wed, 2007-09-26 at 11:37 -0800, Israel Brewster wrote:
> If I understand what you are asking, I use a QTreeView for that sort
> of display. Not quite the proper use, perhaps, but it does display
> all of the columns without splitting them into individual cells like
> the QTableView does, such that you can click and get the entire row
> selected, alternating line colors (if you want them) etc.
> -----------------------------------------------
> Israel Brewster
> Computer Support Technician
> Frontier Flying Service Inc.
> 5245 Airport Industrial Rd
> Fairbanks, AK 99709
> (907) 450-7250 x293
> -----------------------------------------------
What I'm looking for is very similar to the component on the Downloads
screen in gtk-gnutella, if that helps...
>
>
> On Sep 26, 2007, at 11:06 AM, Michael Sullivan wrote:
>
> > I need a Qt class, but I don't really know what it would be called.
> > It's like a list box in which can be displayed many different
> > fields per
> > record. I want to be able to read in a phone number, name, and
> > address
> > information from a database and then display it in this widget.
> > Does a
> > widget like this exist in Qt? If so, what is it called?
> > -Michael Sullivan-
> >
> > --
> > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> > with "unsubscribe" in the subject or the body.
> > List archive and information: http://lists.trolltech.com/qt-interest/
>
--
[ signature omitted ]