[Qt-interest] QMainWindow contextual menu

oxygen77 at free.fr oxygen77 at free.fr
Mon Dec 29 19:08:25 CET 2008


Hello all,

I still have a problem with the contextual menu of QMainWindow: I've implemented a mouseReleaseEvent handler in the central widget. I have some trouble with the right click handler over the central widget. For testing purpose, I've add a call  QMessageBox::information(...), when I close the information box displayed after the right click, the QMainWindow context menu is shown (list of menubar and dockmenu). If I remove the call to QMessageBox::information or do a left click, the contextual menu is not shown.

I've tryed using accept() but this is not working:

void Terrain::mouseReleaseEvent (QMouseEvent * e) {

    QMessageBox::information (NULL,"Foo","test 3");
    e->accept();
}

thx

Chris




More information about the Qt-interest-old mailing list