Kevin Krammer wrote:
> On Wednesday 15 February 2006 20:15, Christoffer Brodd-Reijer wrote:
>> Andreas Pakulat wrote:
>>> On 15.02.06 17:56:47, Christoffer Brodd-Reijer wrote:
>>>> I have a QLineEdit that should contain a mounting point, but thought I
>>>> should change it a little so that the user can click on a folder-icon
>>>> and browse for a folder. I want to folder-icon to be the default one for
>>>> the icon-theme that the user is using, so that it will stay consistent
>>>> with everything else.
>>>>
>>>> Is there a simple way to do this?
>>> Use the setIconSet() method of the button. It works like this:
>>>
>>> mybutton->setIconSet(SmallIcon("folder"))
>>>
>>> Where "folder" is the name (without extension) of the icon you want. You
>>> can browse the icons under KDEDIR/share/icons///actions
>>>
>>> SmallIcon will give you toolbar-sized icons (16x16 IIRC), check the
>>> documentation about how getting larger/smaller icons.
>>>
>>> Andreas

>> Thank you.
>> Where is the SmallIcon function? And where is the documentation on this?

>
> Documented along KIconLoader
>> I am having trouble finding docs for classes and function in KDE. Do
>> they have any documentation on classes/function that looks like the docs
>> for Qt? Cause they are great.

>
> http://api.kde.org/
>
> or in KDE, when you need the docs of a class you know the name of
> kde:classname
> in your case
> kde:KIconLoader
>
> Cheers,
> Kevin
>
>
>
> ------------------------------------------------------------------------
>
>
>>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Thanks, it worked. But now when I tried to connect my button to a dialog
to select a dir (not a file) I get the following errors:
"error: 'KDirDialog' has not been declared"

What may be wrong? My slot just calls
QString path = KFileDialog::getOpenFileName("/", QString::null, this,
i18n("Choose device"));

Shouldn't that work?

--
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 <<