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. QTableWidget filling out whole QGroupBox
Forum Updated to NodeBB v4.3 + New Features

QTableWidget filling out whole QGroupBox

Scheduled Pinned Locked Moved Solved General and Desktop
qtablewidgetqwidget
5 Posts 2 Posters 1.1k 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.
  • T Offline
    T Offline
    TUStudi
    wrote on last edited by
    #1

    Hey, I have a QGroupBox with a Grid-Layout. in that GroupBox I habe a QWidget for a Plot, another GroupBox with Checkboxes and a QTableWidget. I would like to fill out the whole QGroupBox with the QTableWidget horizontally, but it does not work:

    8d24dc4c-1f58-4db9-9751-adc16aaa5398-image.png

    This is the size Policy of my Table:

    8418acf9-068a-49e8-b4fd-7ac003b3b119-image.png

    If i change the minimum size Width, then the table is gonna stretched horizontally, but only the second column is getting bigger.
    I want both columns to be the same size

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

      Hi
      If the layout is a grid one, then you should be able to grab right side of the QTableWidget and drag it out
      over the right edge and it should jump into place , covering that area too.

      alt text

      T 1 Reply Last reply
      2
      • mrjjM mrjj

        Hi
        If the layout is a grid one, then you should be able to grab right side of the QTableWidget and drag it out
        over the right edge and it should jump into place , covering that area too.

        alt text

        T Offline
        T Offline
        TUStudi
        wrote on last edited by TUStudi
        #3

        @mrjj Hey, this works, thanks, but only the right column is getting stretched. Is it possible to let both columns have the same size when stretching the table?

        mrjjM 1 Reply Last reply
        0
        • T TUStudi

          @mrjj Hey, this works, thanks, but only the right column is getting stretched. Is it possible to let both columns have the same size when stretching the table?

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

          @TUStudi
          Hi
          you mean inside the table ?

          like
          table->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
          so they both are same size ?

          T 1 Reply Last reply
          2
          • mrjjM mrjj

            @TUStudi
            Hi
            you mean inside the table ?

            like
            table->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
            so they both are same size ?

            T Offline
            T Offline
            TUStudi
            wrote on last edited by
            #5

            @mrjj That's it, thanks :)

            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