[Qt-interest] I am looking for a kick start on how to create atree widget with a group by box

techsgin techsgin at gmail.com
Sat Dec 13 22:26:25 CET 2008


Thanks

 

  _____  

From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Sebastian Fischer
Sent: Saturday, December 13, 2008 21:19 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] I am looking for a kick start on how to create
atree widget with a group by box

 

Hi,

 

the majority of the work will go into creating a subclass of
QAbstractItemModel. Most likely you can use the other classes as they are
(QHeaderView is even implicitly embedded in QTreeView and you usualy don't
have to worry about it). Please have a look at QSortFilterProxyModel instead
of the QProxyModel, since the latter is outdated (as the help page in QT
Assistant will tell you). If you need to implement the functionality
yourself you hould subclass QAbstractProxyModel.

Through various data roles that the view can request from the model the
shown output will be defined including icons, font & style, background and
so forth. This also includes the headers. If you read through the 'Detailed
Description' of QAbstractItemModel or the 'Model Subclassing Reference'
you'll see what functions you need to reimplement and which you'll want to
reimplement from the optional ones.

 

Just ask if you run into any more trouble :)

 

Bye,

Sebastian Fischer

 

on 13.12.2008 at 15:08 you wrote:


 

Hi All

 

I am looking for a kick start on how to create a tree\table widget with a
group by box like the inbox in outlook.

 

I believe that this task involves the following components:

 

A model for the data (QAbstractItemModel) 

A proxy for filtering and rearrangements (QProxyModel)

A viewer (QTreeView) 

A manipulation header (the group by box) (QHeaderView) 

 

I will appreciate if someone had experience with this kind of task before,
and can share his\her knowledge

 

Many thanks

TechSgin

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081213/dfe96565/attachment.html 


More information about the Qt-interest-old mailing list