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

Allow pasting of widgets into containers with layouts

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 5.15.4
    • Fix Version/s: None
    • Component/s: Tools: Designer
    • Labels:
      None
    • Environment:

      Qt Creator 4.14.0, Windows 10 64-bit

      Description

      Currently, widgets cannot be pasted into containers that have layouts. The layout must be broken first.

      This seems like an unnecessary limitation and it would be super convenient if widgets could be pasted into containers with layouts.

      The basic behavior could be:

      • If pasted with the context menu on the form, just paste the widget(s) at the same location they'd end up if they were dragged from somewhere then dropped at the spot where the context menu click occurred. Fail and display an error if the click position isn't a valid drop point (probably better UX to disable "Paste" in the menu if it's not a valid drop point so the user doesn't have to experiment).
      • If pasted with Ctrl-V while a container is selected, or if pasted with the context menu in the object tree pane, then add the widgets in exactly the same way QLayout::addWidget(widget) would add them – i.e. "in a manner specific to the layout". Fail and display an error if no container is selected.

      Thanks!

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jasonc Jason Cipriani
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes