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. how to synchronize QTableViews in layouts ?
Forum Updated to NodeBB v4.3 + New Features

how to synchronize QTableViews in layouts ?

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

    Hello, i am recreating my topic because because the other title was linked to another problem.

    i'm working on a Qt project with an interface and i'm using four QTableViews and for some reason, the last one is not following the others when i stretch the windows. the 4 tableviews have the exact same parameters and layout configuration. they are in layouts, along with other items on the interface. i set the MaximumWidth of my tableview like this : 03df00ec-9958-4d8a-8757-ee40e6f1b5ea-image.png

    and here's what i get when i launch my program and when i stretch the window :f3bf5c65-fe86-4729-8c31-1a7162e442dc-image.png

    as you can see the last qtableview goes way farther and the other ones along with its QPushButton and labels. i dont get why does it behave like this. has anyone dealt with this problem ?

    thank you in advance

    Pl45m4P 1 Reply Last reply
    0
    • A aftalib

      Hello, i am recreating my topic because because the other title was linked to another problem.

      i'm working on a Qt project with an interface and i'm using four QTableViews and for some reason, the last one is not following the others when i stretch the windows. the 4 tableviews have the exact same parameters and layout configuration. they are in layouts, along with other items on the interface. i set the MaximumWidth of my tableview like this : 03df00ec-9958-4d8a-8757-ee40e6f1b5ea-image.png

      and here's what i get when i launch my program and when i stretch the window :f3bf5c65-fe86-4729-8c31-1a7162e442dc-image.png

      as you can see the last qtableview goes way farther and the other ones along with its QPushButton and labels. i dont get why does it behave like this. has anyone dealt with this problem ?

      thank you in advance

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @aftalib

      How does your layout look like? What is your layoutStretch?


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      A 1 Reply Last reply
      0
      • Pl45m4P Pl45m4

        @aftalib

        How does your layout look like? What is your layoutStretch?

        A Offline
        A Offline
        aftalib
        wrote on last edited by aftalib
        #3

        @Pl45m4 90d1fa2f-13db-4770-92c6-eddde2b28f37-image.png

        here's my layout for the bottom part of the window. my layout stretch is 1,7,1,3 (the spacer,the layout with the two tableviews in it, the other spacer and the last table view)

        the layout stretch is the same on the upper part and on the bottom part

        Pl45m4P 1 Reply Last reply
        0
        • A aftalib

          @Pl45m4 90d1fa2f-13db-4770-92c6-eddde2b28f37-image.png

          here's my layout for the bottom part of the window. my layout stretch is 1,7,1,3 (the spacer,the layout with the two tableviews in it, the other spacer and the last table view)

          the layout stretch is the same on the upper part and on the bottom part

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by
          #4

          @aftalib said in how to synchronize QTableViews in layouts ?:

          the layout stretch is the same on the upper part and on the bottom part

          That seems weird... If both of your TableViews are in the same layout with the same stretch and resize policy, they should not behave differently (since the spacer pushes the whole layout and its content while resizing the window).

          Are the resize policies of your tableViews and the right widgets in the layout really the same?


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          0
          • nageshN Offline
            nageshN Offline
            nagesh
            wrote on last edited by nagesh
            #5

            @aftalib Did you modify the layout behavior through code?

            1 Reply Last reply
            0
            • A Offline
              A Offline
              aftalib
              wrote on last edited by
              #6

              Hello, after looking for multiples answers (in vain..) i decided to start my interface from scratch. it resolved my problem. i think that i probably made too many modifications on my tableview and some things that i didnt remember of were getting in the way. thank you anyway for your answers

              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