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. Form layout

Form layout

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 468 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    I have a form which has 5 rows of various inputs, I'm using a QGridLayout for the main layout, there are two additional QTableViews at the bottom of the form which are populated according to the selections of the 5 input rows above.

    Initially when the input rows are not populated I hide the table views, this causes the 5 rows to spread out to fill the vertical space.

    Is there a way to maintain the positions of the 5 rows at the top of the form as if the table views were present?

    Kind Regards,
    Sy

    jsulmJ 1 Reply Last reply
    0
    • SPlattenS SPlatten

      @jsulm , thank you, I've read similar suggestions in other posts, however one of the solutions states not to put the spacer into the layout but outside of the layout. The layout is set-up with:

      setLayout(pgrdLayout);
      

      How would I add the spacer outside of the layout ?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @SPlatten Add a vertical layout, add your form layout to it and then the spacer...

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • SPlattenS SPlatten

        I have a form which has 5 rows of various inputs, I'm using a QGridLayout for the main layout, there are two additional QTableViews at the bottom of the form which are populated according to the selections of the 5 input rows above.

        Initially when the input rows are not populated I hide the table views, this causes the 5 rows to spread out to fill the vertical space.

        Is there a way to maintain the positions of the 5 rows at the top of the form as if the table views were present?

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @SPlatten Add a vertical spacer

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        SPlattenS 1 Reply Last reply
        1
        • jsulmJ jsulm

          @SPlatten Add a vertical spacer

          SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by SPlatten
          #3

          @jsulm , thank you, I've read similar suggestions in other posts, however one of the solutions states not to put the spacer into the layout but outside of the layout. The layout is set-up with:

          setLayout(pgrdLayout);
          

          How would I add the spacer outside of the layout ?

          Kind Regards,
          Sy

          jsulmJ 1 Reply Last reply
          0
          • SPlattenS SPlatten

            @jsulm , thank you, I've read similar suggestions in other posts, however one of the solutions states not to put the spacer into the layout but outside of the layout. The layout is set-up with:

            setLayout(pgrdLayout);
            

            How would I add the spacer outside of the layout ?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @SPlatten Add a vertical layout, add your form layout to it and then the spacer...

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            2

            • Login

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