QMessageBox disappears
<p>I'm trying to display a <code>QMessageBox</code> through calling its <code>show</code> function in a lambda function like the following:</p>

<pre><code>connect(ui-&gt;graphButton, &amp;QAbstractButton::clicked, [](void){
        QMessageBox message;
        message.setText(tr("Graphing button clicked"));
        message.show();
});
</code></pre>

<p>However, upon clicking the <code>graphButton</code>, the <code>QMessageBox</code> window appears only momentarily before disappearing. How can I fix this?</p>