Priority: Not Evaluated
Affects Version/s: 5.15.4
Fix Version/s: None
Component/s: Tools: Designer
Qt Creator 4.14.0, Windows 10 64-bit
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.