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

    • Task
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • QPA
    • None
    • iOS/tvOS/watchOS

    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

          Activity

            People

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

              Dates

                Created:
                Updated: