title: How to set an application icon in Qt
body: <p>I have some trouble trying to set an icon for my QT application.</p>
  
  <p>The icon is named "room.ico" and is on the same directory as the source file.</p>
  
  <p>Here is the code :</p>
  
  <pre><code>#include &lt;QApplication&gt;
  #include &lt;QWidget&gt;
  
  int main( int argc, char *argv[ ] )
  {
     QApplication app( argc, argv) ;
     QWidget fenetre;
     fenetre.setWindowIcon(QIcon("room.ico")); // Nothing happens
     fenetre.setWindowTitle("Heloo");    
     fenetre.show();
     return app.exec() ;
  }
  </code></pre>
  
  <p>I have tried to add <code>win32:RC_ICONS += room.ico</code> in the <code>.pro file</code> but that didn't work. I have also tried <code>"./room.ico"</code> but still no icon.</p>
  
  <p>I have tried to use this :</p>
  
  <pre><code>QPixmap pixmap = QPixmap ("room.ico");
  fenetre.setWindowIcon(QIcon(pixmap));
  </code></pre>
  
  <p>And guess what !!! it didn't work ... i'm just a newbie to QT :p</p>
  
  <p>Any suggestions will be appreciated , thanks</p>