Bug#339357: libqt4-dev: a simple test
Package: libqt4-dev
Version: 4.0.1-2
Followup-For: Bug #339357
Hi,
No, I could not find anything. I've just played around with this: A
QTreeWidget with setContextMenuPolicy(Qt::CustomContextMenu) and the signal
customContextMenuRequested(const QPoint&) connected to a my_slot(const
QPoint&) which looks like
void myView::my_slot(const QPoint& pos)
{
QMenu popup(this);
popup.addAction("test 1");
popup.addAction("test 2");
popup.addAction("test 3");
//QAction* retval = popup.exec(m_tw->mapToGlobal(pos));
QAction* retval = popup.exec(QCursor::pos());
qDebug() << retval;
}
This works. The commented out version does not. It opens a popup but
clicking left outside the menu returns not 0.
Artur
Reply to: