title: How can I program a custom popup Window in Qt?
body: <p>My Qt application consists of several screens added on a <code>QStackedLayout()</code>. Now after some useraction I would like a little popup window that confirms the action and disappears after a few seconds. What I would like is a gray rectangle with black border and some text in it. No buttons, no titlebar.</p>
  
  <p>I tried to do it with QMessage Box (see code below) but in general it doesnt seem to be possible to adjust border styles for <code>QMessageBox()</code>. Also the size can't be adjusted.</p>
  
  <pre><code>QMessageBox* tempbox = new QMessageBox;
  tempbox-&gt;setWindowFlags(Qt::FramelessWindowHint);  //removes titlebar
  tempbox-&gt;setStandardButtons(0); //removes button
  tempbox-&gt;setText("Some text");
  tempbox-&gt;setFixedSize(800,300); //has no effect
  tempbox-&gt;show();
  QTimer::singleShot(2000, tempbox, SLOT(close()));  //closes box after 2 seconds
  </code></pre>
  
  <p>So, how can I program a custom popup Window in Qt?</p>