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. Center aligment problem of tablewidget

Center aligment problem of tablewidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 342 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.
  • F Offline
    F Offline
    fres
    wrote on 1 May 2021, 16:46 last edited by fres 5 Jan 2021, 16:48
    #1

    When in run my application, i got this :
    probleme.png

    But i want all item to be align on the center of the window
    I tried to do this:
    sol.png
    But it doesn't work!
    Thank you!
    This is what it looks like without spacer:
    liste.png

    J 1 Reply Last reply 1 May 2021, 18:24
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 1 May 2021, 17:24 last edited by
      #2

      Hi,

      Looks like your widgets are not part of the horizontal layout.

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

      F 1 Reply Last reply 1 May 2021, 20:16
      0
      • F fres
        1 May 2021, 16:46

        When in run my application, i got this :
        probleme.png

        But i want all item to be align on the center of the window
        I tried to do this:
        sol.png
        But it doesn't work!
        Thank you!
        This is what it looks like without spacer:
        liste.png

        J Offline
        J Offline
        JonB
        wrote on 1 May 2021, 18:24 last edited by
        #3

        @fres
        Are you aware that you have the board's white & black squares in the wrong places for chess??!! :)

        1 Reply Last reply
        0
        • S SGaist
          1 May 2021, 17:24

          Hi,

          Looks like your widgets are not part of the horizontal layout.

          F Offline
          F Offline
          fres
          wrote on 1 May 2021, 20:16 last edited by fres 5 Jan 2021, 20:17
          #4

          @SGaist I did change alittle bit, but it didn't work . I don't know what's wrong ?
          ggggg.png

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 2 May 2021, 20:00 last edited by
            #5

            See here for the documentation on how to use layouts in designer.

            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
            1
            • N Offline
              N Offline
              nagesh
              wrote on 3 May 2021, 00:00 last edited by
              #6

              @fres I feel Horizontal spacer is not set properly.
              First Apply Layout to the things(sidebar1,Chessboard,sidebar2) which you want to be at the center of the widget.
              Then set Horizontal layout with HSpacerLeft + Centercontent + HSpacerRight

              1 Reply Last reply
              0

              5/6

              2 May 2021, 20:00

              • Login

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