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

List:       kde-devel
Subject:    Re: qt newbie
From:       pat knoob <pknoob () yahoo ! com>
Date:       2003-02-27 18:43:20
[Download RAW message or body]

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);
 }
        }

it works ok though when I take out the last 3 lines:

"if (chosen != "") { // returned string is empty, if
user pressed "cancel"
 kLineEdit1->setText (chosen);
 }"

and this is the error I get:

kapp.cpp: In method `void kapp::selectFile()': 
kapp.cpp:31: no match for `QStringList & != const
char[1]' 
/usr/include/qt/qvaluelist.h:480: candidates are: bool
QValueList<QString>::operator !=(const
QValueList<QString> &) const 
/usr/include/qt/qcstring.h:312: bool operator !=(const
QCString &, const
QCString &) 
/usr/include/qt/qcstring.h:315: bool operator !=(const
QCString &, const
char *) 
/usr/include/qt/qcstring.h:318: bool operator !=(const
char *, const
QCString &) 
/usr/include/qt/qstring.h:303: bool operator !=(QChar,
QChar) 
/usr/include/qt/qstring.h:308: bool operator !=(char,
QChar) 
/usr/include/qt/qstring.h:313: bool operator !=(QChar,
char) 
/usr/include/qt/qstring.h:905: bool operator !=(const
QString &, const
QString &) 
/usr/include/qt/qstring.h:912: bool operator !=(const
QString &, const char
*) 
/usr/include/qt/qstring.h:918: bool operator !=(const
char *, const QString
&) 
/usr/include/qt/qpoint.h:151: bool operator !=(const
QPoint &, const QPoint
&) 
/usr/include/qt/qsize.h:165: bool operator !=(const
QSize &, const QSize &) 
/usr/include/qt/qrect.h:149: bool operator !=(const
QRect &, const QRect &) 
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_tree.h:193:
bool operator !=(const _Rb_tree_base_iterator &, const
_Rb_tree_base_iterator &) 
kapp.cpp:32: no matching function for call to
`KLineEdit::setText
(QStringList &)' 
/usr/include/qt/qlineedit.h:141: candidates are: void
QLineEdit::setText(const QString &) 
make[2]: *** [kapp.o] Error 1 
make[2]: Leaving directory `/home/joe/kapp/kapp' 
make[1]: Leaving directory `/home/joe/kapp' 
make[1]: *** [all-recursive] Error 1 
make: *** [all] Error 2 

thanx in advance

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
 
>> 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