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. Cut and paste a QTableWidget
Forum Updated to NodeBB v4.3 + New Features

Cut and paste a QTableWidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 396 Views 1 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.
  • S Offline
    S Offline
    Sid Price
    wrote on last edited by
    #1

    First, this is my first project with Qt Designer so I hope someone can help.

    I made good progress with the start of my UI design and I have menu items and a QTableWidget working nicely. However, I need to add more widgets to my UI and I think I need to add a couple of layout widgets. My problem is I tried to "cut" my QTableWidget, place the layout on the center widget and then paste the QTableWidget into one of the layout widgets.

    Qt Designer will not allow me to do this and says I need to "break" the layout before the paste. So, I did the "cut", used the "break" layout button, added a vertical layout, after pasting the QTableWidget I then dragged the QTableWidget into the layout. This appeared to work, however, when I preview the UI and resize it the widgets do not resize with the window as they did before.

    How can I re-enable the auto-resize of the UI?

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

      Hi and welcome to the forums

      About copy a "filled" table widget.

      way 1. One same form ctrl+drag it to create clone

      way 2. Between different forms or projects
      Drag the filled Widget to the left side bar with all the others widget.
      Drop it at the white area below and you get a scratch pad with the widget in.
      Now you can drag this to any layout you wish.
      alt text
      (in the picture i dragged a graphicsView to the empty area )

      Avoid breaking layouts it messes up things and you cant just get it back It must be recreated. :(

      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