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 426 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.
  • F Offline
    F Offline
    fres
    wrote on last edited by fres
    #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

    JonBJ 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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
      0
      • F fres

        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

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on 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
        • SGaistS SGaist

          Hi,

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

          F Offline
          F Offline
          fres
          wrote on last edited by fres
          #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
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on 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
            • nageshN Offline
              nageshN Offline
              nagesh
              wrote on 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

              • Login

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