Important: Please read the Qt Code of Conduct -


  • When using the popup or exec function to display the submenus contained in my qmenu, I would like them to be visible and not disappear when I click the mouse. I know this can be done with the showTearOffMenu function but this function does not suit my visualization needs of my interface.

    I leave the code that I am using for the popup():

    void MainWindow::DespliegoSubmenu()
        reset = false;
        timer.disconnect(&timer, SIGNAL(timeout()), this, SLOT(BarridoMenuPrincipal()));
        Highlight = new QRubberBand(QRubberBand::Line,menu);
        lista = menu->actions();
        p_submenu =0;
        connect(&timer,SIGNAL(timeout()), this, SLOT(BarridoSubMenu()));
        connect(&timer, SIGNAL(timeout()), this, SLOT(update()));
        QPoint point5;
        point5 = mapToGlobal(QPoint(anchura,ui->menubar->rect().height()));

    I would like to add two things:

    • I have another widget that has grabbed the mosue with function grabMouse ().

    • With windows it ignores the mouse click but with Android it is where I have the problem.

Log in to reply