[Qt-interest] IconView and TreeView hybrid

Anthony Serdyukov uksus70 at gmail.com
Mon Jan 26 12:38:06 CET 2009


2009/1/26 Rajeev J Sebastian <rajeev.sebastian at gmail.com>:
> On Mon, Jan 26, 2009 at 3:54 PM, Arnold Krille <arnold at arnoldarts.de> wrote:
>> On Monday 26 January 2009 09:56:09 Rajeev J Sebastian wrote:
>>> I need to build a hybrid IconView and TreeView (I guess similiar to
>>> ListView, only that i need multiple columns as well). Whats the best
>>> way to achieve this using Qt ?
>>
>> Last time I looked (and I use them daily), QTreeView has both multiple columns
>> and icons (the are assigned via the DecorationRole).
>
> By Icon view I mean a "thumbnail" view commonly found in file managers
> (e.g., Dolphin, Konqueror), which shows a preview of each file.
> Icons/Thumbnails representing each file are flowed from left to right.
>
> E.g., Dolphin has two views: a Details view (which shows each item on
> a single row), and a Preview view (which represents each file as a
> thumbnail).
>
> Reagrds
> Rajeev J Sebastian
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>

The columns in thumbnail view are meaningless.
You need both functionalities, but not simultaneously.
Just put both QListView and QTreeView widgets onto QStackWidget, and
toggle their visibility.
Of course, these two views should be connected to the same model.

-- 
Regards,
Anthony



More information about the Qt-interest-old mailing list