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

List:       kde-devel
Subject:    Re: qt newbie
From:       "Luke Chatburn" <lchatburn () isset ! org>
Date:       2003-02-27 19:07:06
[Download RAW message or body]

:-P

You beat me to it... no fair!

-Luke
----- Original Message -----
From: "Aaron J. Seigo" <aseigo@olympusproject.org>
To: <kde-devel@kde.org>
Sent: Thursday, February 27, 2003 6:56 PM
Subject: Re: qt newbie


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Thursday 27 February 2003 11:43, pat knoob wrote:
> > I have problems with QstringList during make, this is
> > what it looks like:
> >
> > void Kapp::selectFile()
> >         {
> >         QStringList chosen =
> > QFileDialog::getOpenFileNames ();
> >  if (chosen != "") { // returned string is empty, if
> > user pressed "cancel"
> >  kLineEdit1->setText (chosen);
> >  }
> >         }
>
> chosen is a QStringList, which is a list of strings.. so comparing a list
of
> strings against a string doesn't make much sense. either compare a single
> item in the list, or in this case do:
>
> if  (chosen.count() > 0)
>
>
> actually, in this case, use KFileDialog instead of QFileDialog. you'll get
the
> nice and crunchy kfiledialog that way =)
>
> i'd also recommend keeping the Qt/KDE API documentation handy as you'll
find
> the answer to most of these sorts of questions within those tomes.
>
> - --
> Aaron J. Seigo
> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
>
> KDE: The 'K' is for 'kick ass'
> http://www.kde.org       http://promo.kde.org/3.1/feature_guide.php
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
>
> iD8DBQE+Xl9C1rcusafx20MRAhb2AJ9O/0dZWs/yGFYoVwEkD8EbSyvFagCgl2P1
> PMsGzDYrSQuC+nG0WoEBqJI=
> =fMSN
> -----END PGP SIGNATURE-----
>
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
unsubscribe <<

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