This is a discussion on Re: More on KParts - KDE ; Jens Herden wrote: > On Monday 20 February 2006 17:32, David Faure wrote: >> On Monday 20 February 2006 11:28, Christoffer Brodd-Reijer wrote: >>> Well, currently I am trying out the "Tree View" of konqueror but I don't >>> mind ...
Jens Herden wrote:
> On Monday 20 February 2006 17:32, David Faure wrote:
>> On Monday 20 February 2006 11:28, Christoffer Brodd-Reijer wrote:
>>> Well, currently I am trying out the "Tree View" of konqueror but I don't
>>> mind changing that if there is a better part to serve the purpose I was
>>> describing earlier.
>> I think you should use the KFileTreeView class (from libkio,
>> kdelibs/kio/kfile/) so that you have more control over the tree view.
> Yes and if you want some code that uses it to get inspiration from you can
> look in:
> Especially basetreeview.cpp/.h can give you some ideas.
I've read the files but it is a bit too much for me. I have instead
tried to read the class references for kfiletreeview and some other
classes, my code ended up looking like
treeView = new KFileTreeView(splitter, "treeview");
KURL url = KURL("/media/psp/PSP/photo");
QString mimetype = KMimeType::findByURL(url)->name();
KFileItem *fileItem = new KFileItem(url, mimetype, 0);
KFileTreeBranch *branch = treeView->addBranch(url, "root");
KFileTreeViewItem *viewItem = new KFileTreeViewItem(treeView, fileItem,
which apparently does not work, since no folder shows in the
kfiletreeview. My current goal is just to show a folder in this
kfiletreeview, nothing more than that. Keeping it simple.
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<