title: Nested QDialog automatically presses a QPushButton inside of it
body: <pre><code>#include &lt;QApplication&gt;
  #include &lt;QDebug&gt;
  #include &lt;QDialog&gt;
  #include &lt;QPushButton&gt;
  #include &lt;QTreeWidget&gt;
  #include &lt;QVBoxLayout&gt;
  
  int main(int argc, char** argv)
  {
      QApplication app(argc, argv);
  
      QDialog dialog;
      QVBoxLayout layout(&amp;dialog);
  
      QTreeWidget treeWidget;
      treeWidget.insertTopLevelItem(0, new QTreeWidgetItem(&amp;treeWidget));
      QObject::connect(&amp;treeWidget, &amp;QTreeWidget::activated, [&amp;treeWidget]() {
          auto secondDialog = new QDialog(&amp;treeWidget);
          auto layout = new QVBoxLayout(secondDialog);
          auto button = new QPushButton();
          QObject::connect(button, &amp;QPushButton::clicked, []() {
              qDebug() &lt;&lt; "button clicked";
          });
          layout-&gt;addWidget(button);
          secondDialog-&gt;show();
      });
      layout.addWidget(&amp;treeWidget);
  
      dialog.show();
  
      return app.exec();
  }
  </code></pre>
  
  <p>When I activate a QTreeWidget's item by pressing Enter, nested dialog is created and it immediately presses button inside of it. How do I get rid of it?</p>