[Qt-interest] small Problem regarding setting a string as label

Nouman Khalid shanik19.gemini at gmail.com
Thu Apr 23 04:41:29 CEST 2009


Hi all

i'm trying a small Qt example to get the directory path by clicking a button
and setting that path as a text label

i'm getting following error message

request for member ‘setText’ in ‘((Form1*)this)->Form1::textLabel1’, which
> is of non-class type ‘QLabel*’
> make: *** [.obj/form1.o] Error 1
>

while compiling following program

void Form1::open_win()
> {
>  QString s = QFileDialog::getExistingDirectory(
>                     "/home",
>                     this,
>                     "get existing directory",
>                     "Choose a directory",
>                     TRUE );
>  textLabel1.setText(s);
>
> }
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090423/765ce612/attachment.html 


More information about the Qt-interest-old mailing list