[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KFileDialog
From:       Carsten Pfeiffer <carpdjih () cetus ! zrz ! tu-berlin ! de>
Date:       2002-08-29 22:30:26
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----

On Thursday 29 August 2002 12:11, Aaron J. Seigo wrote:
> On Sunday 29 August 1999 02:02, hasanen wrote:
> > hi
> > i am trying to use KFileDialog with a filters but there is a problem.
> >
> > i can use getSaveFileName(....) as static slot , but the problem is how
> > to know which filter the user choised ?
>
> use the signal:
>
>     void filterChanged( const QString& filter );
>
> > next , i created an instance of the KFileDialog , but the currentFilter()
> > don't return the selected filter.
>
> when are you calling currentFilter()? before its shown? after the user has
> selected a file? after its shown but before a selection has been made? a
> code snippet would be handy here.

Using a static method, you don't have access to an instance of KFileDialog, so 
you can't call currentFilter() on that. You need to create a KFileDialog 
object and call currentFilter() after exec() returns.

Cheers
Carsten Pfeiffer
-----BEGIN PGP SIGNATURE-----

iQEVAwUBPW6ghKWgYMJuwmZtAQHZtQgAvoYKyOkGE65ZTQ4Syntc0BfNkweAc08M
X4dWMm4VVRCHff4JMuqAFxEvOXtj3nslRYJNfD36OsJ1ywNcYndirn8kdonYl3YZ
V//4SfyIetKfDrtPqGejFB2CEQ5kYOuyTcxM6VF9jeDXeOCBr4w3Uuh4LovIw4Rt
HfmE8HWhHI6wFDaLfTctc7u46W2f0NYFTE8PZ+qFM9thnaNLaKwP9fgOo71rf/EN
RGahWs43qKHuaK4Qa7HEpheeQijKqZoW1zlwBRkZjjRyJlhwDcopah/KVCpvtCpE
M9IYT73uMuHAT9Poe++mEBAGsRy8TAW2w5hVP5KhBE+GuRQA7Tnj8w==
=dHAV
-----END PGP SIGNATURE-----

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic