title: Taking screenshot of a specific window - C++ / Qt
body: <p>In Qt, how do I take a screenshot of a specific window (i.e. suppose I had Notepad up and I wanted to take a screenshot of the window titled "Untitled - Notepad")?
  In their screenshot example code, they show how to take a screenshot of the entire desktop:</p>
  
  <pre><code>originalPixmap = QPixmap::grabWindow(QApplication::desktop()-&gt;winId());
  </code></pre>
  
  <p>How would I get the winId() for a specific window (assuming I knew the window's title) in Qt?</p>
  
  <p>Thanks</p>