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. dose the other column widget influnces the whole gridlayout widgets?

dose the other column widget influnces the whole gridlayout widgets?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 336 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.
  • nicker playerN Offline
    nicker playerN Offline
    nicker player
    wrote on last edited by nicker player
    #1

    I put some widgets on the qgridlayout.
    row1:qlabel,qlineedit
    row2:qlabel,qlineedit
    row3::qlabel,qlineedit
    row4:qwidget

    I put the qwidget which width is wider than the qlabel.So how to set the gridlayout so that the row1 and row3'width wouldnt be changed by the row4 qwidget?
    I added an extra layout on the gridlayout for the row4 qwidget.but didnt work.Heres the pic that what I want to do.the yellow part is the area of widgets,the border means different parts of widgets.

    19c5a8e7-cd1c-4cc9-87f3-1accd6644f1a-image.png

    JonBJ M 2 Replies Last reply
    0
    • nicker playerN nicker player

      I put some widgets on the qgridlayout.
      row1:qlabel,qlineedit
      row2:qlabel,qlineedit
      row3::qlabel,qlineedit
      row4:qwidget

      I put the qwidget which width is wider than the qlabel.So how to set the gridlayout so that the row1 and row3'width wouldnt be changed by the row4 qwidget?
      I added an extra layout on the gridlayout for the row4 qwidget.but didnt work.Heres the pic that what I want to do.the yellow part is the area of widgets,the border means different parts of widgets.

      19c5a8e7-cd1c-4cc9-87f3-1accd6644f1a-image.png

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @nicker-player
      Don't really know what you mean, obviously in a grid layout the width of a column in one row will influence the width in another row. Use fixed widths and/or use a column span maybe in your row #4?

      1 Reply Last reply
      0
      • nicker playerN nicker player

        I put some widgets on the qgridlayout.
        row1:qlabel,qlineedit
        row2:qlabel,qlineedit
        row3::qlabel,qlineedit
        row4:qwidget

        I put the qwidget which width is wider than the qlabel.So how to set the gridlayout so that the row1 and row3'width wouldnt be changed by the row4 qwidget?
        I added an extra layout on the gridlayout for the row4 qwidget.but didnt work.Heres the pic that what I want to do.the yellow part is the area of widgets,the border means different parts of widgets.

        19c5a8e7-cd1c-4cc9-87f3-1accd6644f1a-image.png

        M Offline
        M Offline
        mpergand
        wrote on last edited by mpergand
        #3

        @nicker-player
        Start with a vertical layout
        add a first grid layout to it
        add a horizontal layout for the widget alone
        add a second grid layout

        JonBJ 1 Reply Last reply
        0
        • M mpergand

          @nicker-player
          Start with a vertical layout
          add a first grid layout to it
          add a horizontal layout for the widget alone
          add a second grid layout

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @mpergand
          The issue with that approach is that the two grid layouts are quite independent, so there is no guarantee at all that column1 will be same width in both.

          @nicker-player
          By all means try @mpergand's suggestion. But your row #5 could just be a two-column span, maybe you already know that.

          1 Reply Last reply
          1

          • Login

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