title: Qt C++ Error no matching function for call to 'QString::QString(KeySequence)'
body: <p>I used Qt 4.8.4 for my GUI-Project written in C++. Now I merged to Qt Version 5.7. After a long process of adapting my code I finally got my GUI to open. But when I run my calculation-code I still get this Error:</p>
  
  <p><strong>no matching function for call to 'QString::QString(KeySequence)'</strong></p>
  
  <p>in these lines:</p>
  
  <pre><code>  action = popup-&gt;addAction(EnhTableWidget::tr("&amp;Copy") + QLatin1Char('\t') + QString(QKeySequence(QKeySequence::Copy)));
    ...
    action = popup-&gt;addAction(EnhTableWidget::tr("Delete") + QLatin1Char('\t') + QString(QKeySequence(QKeySequence::Delete)));
    ...
    action = popup-&gt;addAction(EnhTableWidget::tr("Select All") + QLatin1Char('\t') + QString(QKeySequence(QKeySequence::SelectAll)));
  </code></pre>
  
  <p>It seemes that the use of QKeySequence is wrong. From the Qt-site I cannot see the problem. </p>
  
  <p>Does anybody know what is wrong?</p>
  
  <p>Thank you !</p>
  
  <p>This is (part of) my code:</p>
  
  <pre><code> #include "EnhTableWidget.h"
   #include &lt;QKeyEvent&gt;
   #include &lt;QApplication&gt;
   #include &lt;QClipboard&gt;
   #include &lt;QHeaderView&gt;
   #include &lt;QKeySequence&gt;
   #include &lt;QAction&gt;
  
   EnhTableWidget::EnhTableWidget(QWidget *parent) :
    QTableWidget(parent)
   {}
  
  
   void EnhTableWidget::keyPressEvent(QKeyEvent *event)
   {
         if ( event-&gt;matches(QKeySequence::Copy) )
          copy();
         else if ( event-&gt;matches(QKeySequence::Delete) || event-&gt;key() == Qt::Key_Backspace )
          deleteSelected();
         else if ( event-&gt;matches(QKeySequence::SelectAll) )
          selectAll();
         else
          QTableWidget::keyPressEvent(event);
   }
  
  
  QMenu *EnhTableWidget::createStandardContextMenu()
    {
      QMenu *popup = new QMenu(this);
      popup-&gt;setObjectName(QLatin1String("qt_edit_menu"));
      QAction *action = 0;
  
    #ifndef QT_NO_CLIPBOARD
  
      action = popup-&gt;addAction(EnhTableWidget::tr("&amp;Copy") + QLatin1Char('\t') + QString(QKeySequence(QKeySequence::Copy)));
      action-&gt;setEnabled(!selectionModel()-&gt;selectedIndexes().isEmpty());
      connect(action, SIGNAL(triggered()), SLOT(copy()));
  
    #endif
  
      action = popup-&gt;addAction(EnhTableWidget::tr("Delete") + QLatin1Char('\t') + QString(QKeySequence(QKeySequence::Delete)));
      action-&gt;setEnabled(isEnabled() &amp;&amp; !selectionModel()-&gt;selectedIndexes().isEmpty());
      connect(action, SIGNAL(triggered()), this, SLOT(deleteSelected()));
  
          if (!popup-&gt;isEmpty())
                popup-&gt;addSeparator();
  
      action = popup-&gt;addAction(EnhTableWidget::tr("Select All") + QLatin1Char('\t') + QString(QKeySequence(QKeySequence::SelectAll)));
      action-&gt;setEnabled(isEnabled());
      connect(action, SIGNAL(triggered()), SLOT(selectAll()));
  
    return popup;
   }
  </code></pre>