context menu on QTableView and qt 5.6 breaking changes under windows 7?
<p>It seems there is a breaking change on Qt 5.6 and under windows 7 (I don't have the problem under windows 10):</p>

<p>Under Qt 5.4/windows7 with the following code I had no problem:</p>

<p>// .h</p>

<pre><code>class XXX: public QTableView
{
    Q_OBJECT

    QMenu *menu_;
    void init();

private Q_SLOTS:    
    void showOrderDlg(const QModelIndex &amp; index); 
    void ActionGridContextMenu(QAction* action);
};
</code></pre>

<p>// .cpp</p>

<pre><code>void XXX::init(QPoint)
{
    setContextMenuPolicy(Qt::CustomContextMenu);
    connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint)));
    menu_ = new QMenu(this);    
    (menu_-&gt;addAction("Start"))-&gt;setIcon(QIcon(":/Images/Resources/Image/1.png"));
    (menu_-&gt;addAction("Stop"))-&gt;setIcon(QIcon(":/Images/Resources/Image/2.png"));
    connect(menu_, SIGNAL(triggered(QAction*)),this, SLOT(ActionGridContextMenu(QAction*)));
}

void XXX::showContextMenu(QPoint)
{ 
    menu_-&gt;exec(QCursor::pos()); 
}

void XXX::ActionGridContextMenu(QAction* action)
{

}
</code></pre>

<p>I have updated to Qt 5.6, and no menu is shown now...</p>

<p><strong>It seems class which not derivated from <code>QTableView</code> are not impacted</strong>.</p>

<p>Is there a thing I do wrong here ?</p>

<p>EDIT: see my last comment for the fix</p>