Qt showing a dialog as frameless when called from main window
<p>I am learning qt and was trying an example from book, where we have to call pre-made dialogs from main window application.</p>

<p>I already made a dialog which will be used to enter a string(lets call it findDialog), the entered string is passed to a custom slot in QTableWidget to search for the entered string.</p>

<p>I can call the dialog as soon as an action called "find" is triggered, but the problem is that the dialog is shown as frameless. </p>

<p>I am calling the dialog like this, please point out any mistakes.</p>

<pre><code>void MainWindow::find()
{
    // Check whether findDialog is already created
    if(!finddialog)
    {
        // create find dialog as a child to main window
        finddialog = new findDialog(this);
        // Connecting signals and slots 
     connect(finddialog,SIGNAL(forwardSearch(QString,Qt::CaseSensitivity)),
        sheetObject,SLOT(forwardSearch(QString,Qt::CaseSensitivity)));
      connect(finddialog,SIGNAL(backwardSearch(QString,Qt::CaseSensitivity)),
        sheetObject,SLOT(backwardSearch(QString,Qt::CaseSensitivity)));
    }
    // Show dialog
    finddialog-&gt;show();

    finddialog-&gt;move(200,200);
    // Raise if minimised
    finddialog-&gt;raise();
    // Activate it
    finddialog-&gt;activateWindow();
}
</code></pre>

<p>I cannot use exec because, i haven't connected accept() slot in findDialog to anything.</p>

<p>I am also attaching a picture showing the dialog when it has been called. Please tell me the mistake i have done and how to show the dialog with frame.
<a href="https://i.stack.imgur.com/A1X87.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A1X87.png" alt="findDialog without frame"></a></p>