Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Copy and paste form does not maintain layout
Forum Updated to NodeBB v4.3 + New Features

Copy and paste form does not maintain layout

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 3 Posters 1.1k Views 4 Watching
  • 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    Up front - I DO REALIZE I MAY BE PUSHING THE ENVELOPE.

    I prefer NOT to reinvent the wheel, however,
    I have not been very successful adding "existing file " to my application.

    By accident I managed to "copy and paste" the entire form into my new , blank , form - all in QtDesigner.

    Small issue - no matter what I try the copy / paste DOES NOT maintaining the original layout . ( Break layout before "copy" is the worst "option" .)

    That in not big deal on few widgets form, and it is a good practice to rearrange the new form to suit my needs, BUT

    the question

    is there a way to "copy and paste" forms and MAINTAIN the layout?

    Pl45m4P 1 Reply Last reply
    0
    • mrjjM mrjj

      Hi
      Just as a note.
      You can get around the "Not being able to copy to a form that has a layout" by
      dragging your widget to the left side Widget list.

      It creates an entry in the scratchPad.
      alt text
      (test in the picture)

      This can be as complex a widget as you like.
      You can then drag to insert into a layout like normal
      where it shows a small blue line to indicate the insertion point.

      A Offline
      A Offline
      Anonymous_Banned275
      wrote on last edited by
      #4

      @mrjj said in Copy and paste form does not maintain layout:

      Hi
      Just as a note.
      You can get around the "Not being able to copy to a form that has a layout" by
      dragging your widget to the left side Widget list.

      It creates an entry in the scratchPad.
      alt text
      (test in the picture)

      This can be as complex a widget as you like.
      You can then drag to insert into a layout like normal
      where it shows a small blue line to indicate the insertion point.

      dragging your widget to the left side Widget list. ???

      1. I do not have much luck
        should I have "Display Widgets " bar ??
        When I drag all I get is thick border "window" and that is it...
        Sometime it will "break " the layout.

      2. I also do not have "Scratchpad " bar.

      Do I need "more " that QtCreator version 3.5.1 / Qt 5.5.1 ?
      Or am I missing some option ?

      Pl45m4P A 2 Replies Last reply
      0
      • A Anonymous_Banned275

        Up front - I DO REALIZE I MAY BE PUSHING THE ENVELOPE.

        I prefer NOT to reinvent the wheel, however,
        I have not been very successful adding "existing file " to my application.

        By accident I managed to "copy and paste" the entire form into my new , blank , form - all in QtDesigner.

        Small issue - no matter what I try the copy / paste DOES NOT maintaining the original layout . ( Break layout before "copy" is the worst "option" .)

        That in not big deal on few widgets form, and it is a good practice to rearrange the new form to suit my needs, BUT

        the question

        is there a way to "copy and paste" forms and MAINTAIN the layout?

        Pl45m4P Offline
        Pl45m4P Offline
        Pl45m4
        wrote on last edited by Pl45m4
        #2

        @AnneRanch said in Copy and paste form does not maintain layout:

        By accident I managed to "copy and paste" the entire form into my new , blank , form - all in QtDesigner.

        Better keep it as 'an accident'.

        Short answer: I guess not.

        Because it copied all including widgets on this form separately (like copying multiple files from one directory to another on your PC) and just threw them on your new form, without any layout.

        Edit: I just tested around a bit. You can copy widgets with content and layout to another form with no layout, but you can not copy widgets with layout and content to another form, which has already a layout. (It pops up a warning, that the destination form has a layout set)


        If debugging is the process of removing software bugs, then programming must be the process of putting them in.

        ~E. W. Dijkstra

        1 Reply Last reply
        1
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #3

          Hi
          Just as a note.
          You can get around the "Not being able to copy to a form that has a layout" by
          dragging your widget to the left side Widget list.

          It creates an entry in the scratchPad.
          alt text
          (test in the picture)

          This can be as complex a widget as you like.
          You can then drag to insert into a layout like normal
          where it shows a small blue line to indicate the insertion point.

          A 1 Reply Last reply
          2
          • mrjjM mrjj

            Hi
            Just as a note.
            You can get around the "Not being able to copy to a form that has a layout" by
            dragging your widget to the left side Widget list.

            It creates an entry in the scratchPad.
            alt text
            (test in the picture)

            This can be as complex a widget as you like.
            You can then drag to insert into a layout like normal
            where it shows a small blue line to indicate the insertion point.

            A Offline
            A Offline
            Anonymous_Banned275
            wrote on last edited by
            #4

            @mrjj said in Copy and paste form does not maintain layout:

            Hi
            Just as a note.
            You can get around the "Not being able to copy to a form that has a layout" by
            dragging your widget to the left side Widget list.

            It creates an entry in the scratchPad.
            alt text
            (test in the picture)

            This can be as complex a widget as you like.
            You can then drag to insert into a layout like normal
            where it shows a small blue line to indicate the insertion point.

            dragging your widget to the left side Widget list. ???

            1. I do not have much luck
              should I have "Display Widgets " bar ??
              When I drag all I get is thick border "window" and that is it...
              Sometime it will "break " the layout.

            2. I also do not have "Scratchpad " bar.

            Do I need "more " that QtCreator version 3.5.1 / Qt 5.5.1 ?
            Or am I missing some option ?

            Pl45m4P A 2 Replies Last reply
            0
            • A Anonymous_Banned275

              @mrjj said in Copy and paste form does not maintain layout:

              Hi
              Just as a note.
              You can get around the "Not being able to copy to a form that has a layout" by
              dragging your widget to the left side Widget list.

              It creates an entry in the scratchPad.
              alt text
              (test in the picture)

              This can be as complex a widget as you like.
              You can then drag to insert into a layout like normal
              where it shows a small blue line to indicate the insertion point.

              dragging your widget to the left side Widget list. ???

              1. I do not have much luck
                should I have "Display Widgets " bar ??
                When I drag all I get is thick border "window" and that is it...
                Sometime it will "break " the layout.

              2. I also do not have "Scratchpad " bar.

              Do I need "more " that QtCreator version 3.5.1 / Qt 5.5.1 ?
              Or am I missing some option ?

              Pl45m4P Offline
              Pl45m4P Offline
              Pl45m4
              wrote on last edited by Pl45m4
              #5

              @AnneRanch

              @mrjj did this in QtDesigner, not QtCreator. His screenshot shows the widget bar on the left.

              To use this feature you'll need that menu bar to be visible. Maybe you have hidden it?!


              If debugging is the process of removing software bugs, then programming must be the process of putting them in.

              ~E. W. Dijkstra

              1 Reply Last reply
              0
              • A Anonymous_Banned275

                @mrjj said in Copy and paste form does not maintain layout:

                Hi
                Just as a note.
                You can get around the "Not being able to copy to a form that has a layout" by
                dragging your widget to the left side Widget list.

                It creates an entry in the scratchPad.
                alt text
                (test in the picture)

                This can be as complex a widget as you like.
                You can then drag to insert into a layout like normal
                where it shows a small blue line to indicate the insertion point.

                dragging your widget to the left side Widget list. ???

                1. I do not have much luck
                  should I have "Display Widgets " bar ??
                  When I drag all I get is thick border "window" and that is it...
                  Sometime it will "break " the layout.

                2. I also do not have "Scratchpad " bar.

                Do I need "more " that QtCreator version 3.5.1 / Qt 5.5.1 ?
                Or am I missing some option ?

                A Offline
                A Offline
                Anonymous_Banned275
                wrote on last edited by
                #6

                @AnneRanch said in Copy and paste form does not maintain layout:

                @mrjj said in Copy and paste form does not maintain layout:

                Hi
                Just as a note.
                You can get around the "Not being able to copy to a form that has a layout" by
                dragging your widget to the left side Widget list.

                It creates an entry in the scratchPad.
                alt text
                (test in the picture)

                This can be as complex a widget as you like.
                You can then drag to insert into a layout like normal
                where it shows a small blue line to indicate the insertion point.

                dragging your widget to the left side Widget list. ???

                1. I do not have much luck
                  should I have "Display Widgets " bar ??
                  When I drag all I get is thick border "window" and that is it...
                  Sometime it will "break " the layout.

                2. I also do not have "Scratchpad " bar.

                Do I need "more " that QtCreator version 3.5.1 / Qt 5.5.1 ?
                Or am I missing some option ?

                Never mid - fixed by closing he "widget categories " ( my invented term ) and now I have "Scratchpad " visible.

                This is why I like forum instead of "RTFM" some stuff is just buried way too deep.

                Appreciate the help.
                SOLVED

                1 Reply Last reply
                1
                • A Offline
                  A Offline
                  Anonymous_Banned275
                  wrote on last edited by
                  #7

                  I need to reopen this thread.
                  For fife of me I cannot figure out how to put the entire form into scratchpad.
                  I keep picking individual widgets and that is not what I am after.

                  So - how do I "drag and drop " the complete layout?

                  mrjjM 1 Reply Last reply
                  0
                  • A Anonymous_Banned275

                    I need to reopen this thread.
                    For fife of me I cannot figure out how to put the entire form into scratchpad.
                    I keep picking individual widgets and that is not what I am after.

                    So - how do I "drag and drop " the complete layout?

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #8

                    @AnneRanch
                    Hi
                    I also tried that but it seems it won't allow dragging the top widget (the form)
                    First I thought it was maybe due to being a MainWindow but didn't work for a QWidget based either.
                    So I think its not possible simply from the fact you cant really drag the top one.

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      Anonymous_Banned275
                      wrote on last edited by Anonymous_Banned275
                      #9

                      One more "gotcha"

                      Dragging widget to scratchpad DELETES it from the form !

                      1 Reply Last reply
                      0

                      • Login

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