Select a directory with KFileWidget?

Andreas Pakulat apaku at gmx.de
Thu Jan 8 22:51:13 GMT 2009


On 08.01.09 23:25:18, Rafael Fernández López wrote:
>> I've got a small problem here with KFileWidget. I want to embed it into a
>> wizard to choose either a file or a directory, but I can't seem to find a
>> way to select a directory with it. Is this simply not supported? Could this
>> be added?
>
> fileWidget->setMode(KFile::Directory) ?

Damn, I always forget the details :) I actually want a mixed mode, i.e.
allow selection of files and directories. Actually I think I could get away
with a signal thats emitted every time the directory is changed in the
widget. Oh and either fileSelected or fileHighlighted also being emitted
when the user has double-click behaviour in KDE and single-clicks on a
directory (didn't test wether this might already be the case).

Does that make sense? I can probably come up with the patch...

Andreas

-- 
Accent on helpful side of your nature.  Drain the moat.




More information about the kde-core-devel mailing list