Bug#339357: libqt4-dev: a simple test

2005-11-21 Thread Brian Nelson
Artur Wiebe <[EMAIL PROTECTED]> writes:

> 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.

Well, I just looked over the QMenu code to try to see what could be
happening here, but nothing obvious stood out.

Would you like to file a bug upstream and see if the trolls can figure
it out?

-- 
Captain Logic is not steering this tugboat.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#339357: libqt4-dev: a simple test

2005-11-15 Thread Artur Wiebe
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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]