Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Designer: copy and paste? Drag and Drop (with option key for "duplicate")?
QtWS25 Last Chance

Qt Designer: copy and paste? Drag and Drop (with option key for "duplicate")?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
13 Posts 5 Posters 9.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    davecotter
    wrote on 18 May 2019, 16:38 last edited by
    #1

    it seems that copy and paste doesn't actually work in Designer. Say i make a group of things that i need several of, i expect i can select the group, and go copy, paste, and a copy of the group will paste next to (or inside of) the thing that is selected.

    but it's a no go?

    likewise in the heirarchical view on the right, i can't copy paste there either, nor can i drag while holding option to duplicate. in fact why can't i drag at all in the hierarchical list?

    am i missing something?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      davecotter
      wrote on 20 May 2019, 21:41 last edited by
      #6

      well, i suppose i'd imagine it would either:

      1: paste it last in the group that contains whatever is already selected (so you can go "copy paste" and have it appear next to the already selected item or
      2: show a little alert dialog telling you what to do to have paste work

      the reason i didn't imagine using "control" as the "duplicate" modifier is that i'm on a mac. on the mac, the option key is the "duplicate" modifier for drag and drop. i'd consider this a bug :/

      thanks

      K 1 Reply Last reply 20 May 2019, 21:45
      0
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 18 May 2019, 18:52 last edited by
        #2

        Hi
        That sounds a bit odd. inside design area, i can copy & paste all i like.
        Also CTRL + drag a widget will duplicate it. (on windows/linux at least)
        However, you are right that dragging from hierarchical don't work. but does allow right click and use copy.

        K 1 Reply Last reply 19 May 2019, 19:27
        3
        • M mrjj
          18 May 2019, 18:52

          Hi
          That sounds a bit odd. inside design area, i can copy & paste all i like.
          Also CTRL + drag a widget will duplicate it. (on windows/linux at least)
          However, you are right that dragging from hierarchical don't work. but does allow right click and use copy.

          K Offline
          K Offline
          kshegunov
          Moderators
          wrote on 19 May 2019, 19:27 last edited by
          #3

          @mrjj said in Qt Designer: copy and paste? Drag and Drop (with option key for "duplicate")?:

          i can copy & paste all i like.

          Copy yes, paste only if not into a layout-ed widget.

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply
          0
          • D Offline
            D Offline
            davecotter
            wrote on 19 May 2019, 19:57 last edited by
            #4

            But all of my widgets are in the outs. Why can you not paste into a layout? That doesn’t seem to be any real good reason.

            K 1 Reply Last reply 19 May 2019, 20:22
            0
            • D davecotter
              19 May 2019, 19:57

              But all of my widgets are in the outs. Why can you not paste into a layout? That doesn’t seem to be any real good reason.

              K Offline
              K Offline
              kshegunov
              Moderators
              wrote on 19 May 2019, 20:22 last edited by
              #5

              @davecotter said in Qt Designer: copy and paste? Drag and Drop (with option key for "duplicate")?:

              Why can you not paste into a layout?

              Just the way it is. Can't decide where to paste it. Drag & drop with Ctrl held works though, as you can choose where the copied widget goes.

              Read and abide by the Qt Code of Conduct

              1 Reply Last reply
              0
              • D Offline
                D Offline
                davecotter
                wrote on 20 May 2019, 21:41 last edited by
                #6

                well, i suppose i'd imagine it would either:

                1: paste it last in the group that contains whatever is already selected (so you can go "copy paste" and have it appear next to the already selected item or
                2: show a little alert dialog telling you what to do to have paste work

                the reason i didn't imagine using "control" as the "duplicate" modifier is that i'm on a mac. on the mac, the option key is the "duplicate" modifier for drag and drop. i'd consider this a bug :/

                thanks

                K 1 Reply Last reply 20 May 2019, 21:45
                0
                • D davecotter
                  20 May 2019, 21:41

                  well, i suppose i'd imagine it would either:

                  1: paste it last in the group that contains whatever is already selected (so you can go "copy paste" and have it appear next to the already selected item or
                  2: show a little alert dialog telling you what to do to have paste work

                  the reason i didn't imagine using "control" as the "duplicate" modifier is that i'm on a mac. on the mac, the option key is the "duplicate" modifier for drag and drop. i'd consider this a bug :/

                  thanks

                  K Offline
                  K Offline
                  kshegunov
                  Moderators
                  wrote on 20 May 2019, 21:45 last edited by
                  #7

                  1: paste it last in the group that contains whatever is already selected (so you can go "copy paste" and have it appear next to the already selected item or

                  Couldn't work for grid layouts.

                  2: show a little alert dialog telling you what to do to have paste work

                  Well, I get a dialog saying that. Don't you?

                  the reason i didn't imagine using "control" as the "duplicate" modifier is that i'm on a mac. on the mac, the option key is the "duplicate" modifier for drag and drop. i'd consider this a bug

                  Maybe, I don't know. I don't work on mac, so I really have no clue.

                  Read and abide by the Qt Code of Conduct

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    davecotter
                    wrote on 20 May 2019, 22:32 last edited by
                    #8

                    for a grid layout, just paste next to the current item, offset down and to the right by 20 pixels. the point is, whatever happens, don't FAIL to paste. let the user manage the wrong paste location.. IMHO

                    yes i do get a dialog that says this:

                    Cannot paste widgets. Designer could not find a container without a layout to paste into.

                    which just seems... surprising to me. there are all sorts of containers available. including the layout container i'm in. go ahead and paste into my layout container, it's exactly what i want.

                    Break the layout of the container you want to paste into, select this container and then paste again

                    i do not want to break the layout. that's not a helpful suggestion.

                    a good suggestion would be "try control-dragging the widget, and drop it where you want it"

                    (although, control-click on mac causes a "right click" or "context menu click" which is why no mac user would ever imagine control-clicking would cause a duplicate-drag)

                    K 1 Reply Last reply 21 May 2019, 08:34
                    0
                    • D davecotter
                      20 May 2019, 22:32

                      for a grid layout, just paste next to the current item, offset down and to the right by 20 pixels. the point is, whatever happens, don't FAIL to paste. let the user manage the wrong paste location.. IMHO

                      yes i do get a dialog that says this:

                      Cannot paste widgets. Designer could not find a container without a layout to paste into.

                      which just seems... surprising to me. there are all sorts of containers available. including the layout container i'm in. go ahead and paste into my layout container, it's exactly what i want.

                      Break the layout of the container you want to paste into, select this container and then paste again

                      i do not want to break the layout. that's not a helpful suggestion.

                      a good suggestion would be "try control-dragging the widget, and drop it where you want it"

                      (although, control-click on mac causes a "right click" or "context menu click" which is why no mac user would ever imagine control-clicking would cause a duplicate-drag)

                      K Offline
                      K Offline
                      kshegunov
                      Moderators
                      wrote on 21 May 2019, 08:34 last edited by kshegunov
                      #9

                      @davecotter said in Qt Designer: copy and paste? Drag and Drop (with option key for "duplicate")?:

                      for a grid layout, just paste next to the current item

                      The problem is next to it to the right, to the left, or on the next row?

                      a good suggestion would be "try control-dragging the widget, and drop it where you want it"

                      I agree. We could actually rectify that by a rather simple and small patch to Creator.

                      Read and abide by the Qt Code of Conduct

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        davecotter
                        wrote on 21 May 2019, 16:19 last edited by davecotter
                        #10

                        next to it to the right, to the left, or on the next row?

                        Anywhere. It literally doesn't matter, as long as it scrolls into view if it goes off screen. The user can then pick it up and drag it where they meant to put it, if it's in the wrong place.

                        Anything but "i'm not gonna paste this". At least, that would be my expectation.

                        I'm going by the tenet of "the UI of least surprise", and i figure it's LESS surprising to paste in the wrong place, and MORE surprising to just block the ability to paste.

                        :D

                        -dave

                        1 Reply Last reply
                        0
                        • BaehtiHB Offline
                          BaehtiHB Offline
                          BaehtiH
                          Banned
                          wrote on 30 May 2019, 08:49 last edited by
                          #11
                          This post is deleted!
                          M 1 Reply Last reply 30 May 2019, 08:52
                          0
                          • BaehtiHB BaehtiH
                            30 May 2019, 08:49

                            This post is deleted!

                            M Offline
                            M Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on 30 May 2019, 08:52 last edited by
                            #12
                            This post is deleted!
                            1 Reply Last reply
                            0
                            • J Offline
                              J Offline
                              JulianTreiber
                              wrote on 7 Nov 2020, 19:00 last edited by
                              #13

                              Hey, I hope this is not awfully late.
                              I've had the same problem with copy and pasting and found the easiest way to evade it is to use CTRL + (drag widget) instead.

                              1 Reply Last reply
                              2

                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved