title: QT : get the class name of an object
body: <p>I'm writing a test app that simulates key presses of another application. For every key press I have to check if the right window/form is shown. So what I do is get the pointer of the window being shown and get it's window title. However, not all the windows/forms shown window titles. So I'm thinking it would be better to get the name of the class instead. How can I get the name of the class? </p>
  
  <pre><code>QWidget *pWin = QApplication::activeWindow();
  </code></pre>
  
  <p>when I try:</p>
  
  <pre><code>pWin-&gt;className(); 
  </code></pre>
  
  <p>to get the name of the class, I'm getting:</p>
  
  <blockquote>
    <p>"error: class QWidget has no member named 'className' "</p>
  </blockquote>
  
  <p>Can somebody show me the right way? </p>