Hi guys,

I have a little problem over here, hope you can help me. When i compile a little application i get this: error: invalid use of void expression

I dont have any idea why im getting that message, the code that gives me problems is the following:

Qt Code:
  1. connect(feliz, SIGNAL(clicked()), SLOT(sendImage()));
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. void SimpleChatClient::sendImage(){
  2. QString html;
  3. QImage img("/home/wae/Qt4/SimpleChat/SimpleChatClient/Iconos/feliz.png");
  4. chat->document()->addResource(QTextDocument::ImageResource, QUrl("/home/wae/Qt4/SimpleChat/SimpleChatClient/Iconos/feliz.png"), img);
  5. html.append("<img src=/home/wae/Qt4/SimpleChat/SimpleChatClient/Iconos/feliz.png>");
  6. socket->write("<" + nick->text().toLatin1() + "> " );
  7. socket->write(chat->setHtml(html));
  8. socket->write("\n");
  9. }
To copy to clipboard, switch view to plain text mode 

I also added the slot in my .h

Hope you can help me, thank u in advanced!!!