Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-83811

need ability to customize the popup menu that goes with text selection handles

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: QPA
    • Labels:
      None
    • Platform/s:
      iOS/tvOS/watchOS
    • Technical Risk:
      Normal

      Description

      Qt::ImhNoEditMenu for example is a way to hide this menu. By default the menu contains menu items Select, Select All and Paste when text is not yet selected, or Cut, Copy, Paste and Delete when text is selected. (In fact, it's difficult to get the Cut, Copy, Paste and Delete menu at all, when trying to implement a custom item. Normally when a selection is provided, the Select/SelectAll/Paste menu continues to show anyway. Only the pre-existing text components managed to get that second menu working right, somehow. That's a consequence of the passive event-handling API - not enough control, not enough docs, it's completely mysterious from the application point of view.)

      So one idea is to add another hint like Qt::ImhReadOnly which will remove the Cut, Paste and Delete items, and make a Copy item available (even on the first menu, since the second one is so hard to get).

      A better idea would be to give the application full control over the menu items in that menu, to say the least.

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-83811
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              richard Richard Moe Gustavsen
              Reporter:
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes