Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Set two control in same column in Gridlayout
QtWS25 Last Chance

Set two control in same column in Gridlayout

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 3 Posters 2.2k 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.
  • M Offline
    M Offline
    maxy
    wrote on 12 Jul 2013, 10:18 last edited by
    #1

    Hi,
    How to set the two widget in same column in gridlayout.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 12 Jul 2013, 10:33 last edited by
      #2

      Hi,

      What do you mean by same column ? Two widget at the same place or two widget in the same column on different rows ?

      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
      0
      • J Offline
        J Offline
        Jens
        wrote on 12 Jul 2013, 10:49 last edited by
        #3

        You can nest layouts, so you can put a RowLayout as an item inside a GridLayout. The other solution is to use columnSpan>1 on the other rows in the layout.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          maxy
          wrote on 12 Jul 2013, 10:55 last edited by
          #4

          Hi
          let me explain the problem

          My requirement is i need to place two widgets on the same position for that i made use of grid layout.one widget has a transparent portion and the second one need to be placed exactly at the transparent area here the widget is list(need to be placed at transparent area).the placement is fine but the selection of index starting from above the list.

          thanks in advance

          1 Reply Last reply
          0
          • J Offline
            J Offline
            Jens
            wrote on 12 Jul 2013, 11:28 last edited by
            #5

            I think it might be easier to follow if you show a code example of what you have tried to do and explain what is wrong with that or show a crude drawing of what you are trying to achieve.

            I don't really get from the description that anything is wrong with your grid layout at all. Wrapping an item inside another is simply done by parenting and anchors on the same item.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              maxy
              wrote on 12 Jul 2013, 12:54 last edited by
              #6

              Hi,
              For your reference i pasted a image file.In that image file the white area is a transparent place.so i want to fit the listview in that transparent area.so i used gridlayout to insert the widget like

              grid->addwidget(list,0,0,...)
              grid->addwidget(image,0,0,..)
              ...
              ....

              But i face the index problem in listview.if i click the outside of listview also the list selected.

              Thanks

              1 Reply Last reply
              0

              1/6

              12 Jul 2013, 10:18

              • Login

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