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. StackedWidget / TableWidget Layout dilema
Forum Updated to NodeBB v4.3 + New Features

StackedWidget / TableWidget Layout dilema

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 367 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.
  • DriftwoodD Offline
    DriftwoodD Offline
    Driftwood
    wrote on last edited by
    #1

    Since last night, I've tried to get this right and can't. I'm using a stacked widget. On two of the pages I have tablewidgets. One of them laid out perfectly, the other not so much.

    The first widget lays out same as the listview to its left.

    tableWidget_sites.png

    However, my other tablewidget lack the same width and height as the first one, making it odd-looking.

    tableWidget.png

    What in the world can be done to make this tablewidget layout the same as the first one?

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

      Hi,

      Can you show the code you use to create these widgets ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      DriftwoodD 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Can you show the code you use to create these widgets ?

        DriftwoodD Offline
        DriftwoodD Offline
        Driftwood
        wrote on last edited by
        #3

        @SGaist - I didn't create them with code. Both were created with Creator.

        JoeCFDJ 1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          My bad, I missed that you were using designer.

          Why not have your QTableWidgets in a layout ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • DriftwoodD Driftwood

            @SGaist - I didn't create them with code. Both were created with Creator.

            JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by JoeCFD
            #5

            @Driftwood on your second page there is a vertical layout which may have default contents margins. Set all of them to 0.
            SGaist is right. Better to use some layout for all widgets.

            DriftwoodD 1 Reply Last reply
            0
            • JoeCFDJ JoeCFD

              @Driftwood on your second page there is a vertical layout which may have default contents margins. Set all of them to 0.
              SGaist is right. Better to use some layout for all widgets.

              DriftwoodD Offline
              DriftwoodD Offline
              Driftwood
              wrote on last edited by Driftwood
              #6

              @JoeCFD - I just did that and came back here to your same solution.

              I'm just now getting back into Qt after not using it for a while. Let's see what I can go dumb on next :D

              Thank you both for your input.

              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