qt: Prevent the main window popup menu #219

pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:210223-toolbar changing 1 files +2 −1
  1. hebasto commented at 12:25 PM on February 23, 2021: member

    https://github.com/bitcoin/bitcoin/issues/11168 is not fixed by https://github.com/bitcoin/bitcoin/pull/11169 completely, as users are allowed to right click on the menu bar:

    Screenshot from 2021-02-23 14-18-24

    This PR moves the context menu prohibition from QToolBar instance to its parent BitcoinGUI instance, which is derived from QMainWindow.

  2. qt: Prevent the main window popup menu
    By default, a popup menu contains checkable entries for the toolbars
    and dock widgets present in the main window. This allows users to
    accidentally hide the toolbar.
    ca5bd1c8e5
  3. jarolrod commented at 6:40 PM on February 23, 2021: member

    ACK ca5bd1c8e5fee29a3c2f0a3fbc879ee74f892266, tested on Ubuntu 20.04 Qt 5.12. Confirming that I can replicate the behavior described on master and this PR fixes it.

    The question is: "Is there a use case for disabling tabs?" I would lean towards no. To me, it doesn't make sense to allow a user to toggle the visibility of the tabs.

  4. leonardojobim approved
  5. leonardojobim commented at 10:05 PM on February 23, 2021: none

    tACK https://github.com/bitcoin-core/gui/pull/219/commits/ca5bd1c8e5fee29a3c2f0a3fbc879ee74f892266

    Tested on Ubuntu 20.04 Qt 5.12.8. I also confirm that context menu is displayed on master branch but it does not happen on the branch of this PR.

  6. luke-jr commented at 5:08 PM on February 24, 2021: member

    Concept ACK, but I don't understand why the toolbar inherits this prohibition and other widgets (where we want a context menu) don't...

  7. hebasto commented at 5:15 PM on February 24, 2021: member

    I don't understand why the toolbar inherits this prohibition and other widgets (where we want a context menu) don't...

    Probably, due to the fact that QMainWindow has its own layout which a QMenuBar belongs to.

  8. MarcoFalke merged this on Feb 25, 2021
  9. MarcoFalke closed this on Feb 25, 2021

  10. hebasto deleted the branch on Feb 25, 2021
  11. sidhujag referenced this in commit d3898b055f on Feb 25, 2021
  12. gwillen referenced this in commit d2d21096af on Jun 28, 2022
  13. bitcoin-core locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-01 13:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me