Qt World Summit: Register Today!

QMenu is not closed when clicking same position

  • I want to make a simple program with right-click popup.

    I used menu.exec() to make popup, and it is called inside mouseReleaseEvent.

    When I first right-click the program, popup appears correctly.

    But when I right-click again on the same point(without any mouse move), there are no reaction.

    I expected reappear popup even if I click the same place like Windows' default.

    Can I solve this problem?

  • Moderators

    i guess your popup menu receives the second mouse button click?
    Thus the menu won't popup again.
    You may want to translate the popup menu position by 1 or 2 pixels.

Log in to reply