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. Row inside Row
Forum Updated to NodeBB v4.3 + New Features

Row inside Row

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 1.7k 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.
  • M Offline
    M Offline
    MindWalker
    wrote on last edited by
    #1

    Hi guys.. just started playing around with Qt Quick and QML :)

    This might be totally trivial but I haven't spend much time with QT Quick yet. In short I'm trying to create an abstraction of 2 panels and I want to put them in a Row enclosure. However both panels already specify a Row inside of them. So suppose there's the X panel which contains one Row with "X" text and 2 rectangles, and then there's the Y panel which contains one Row with "Y" text and 2 rectangles.

    If then on my main QML file I create a Row with the XPanel{} everything works fine (as in.. I see the "X" text and the 2 rectangles). As soon as I add the YPanel{} then they overlap which is not what I expected...

    It seems as if the top level Row cannot calculate the space of the 2 custom types which have in turn Row inside of them.. I'm sure I am missing something, it must be possible to do this..

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MindWalker
      wrote on last edited by
      #2

      Well I solved my own problem... turns out the XPanel and the YPanel have to specifically declare width and height in them at the top level type since it's not computed automatically from the other elements that constitute the panel which do have specified width and height.

      Then the Row element knows how to place them correctly wrapping XPanel and YPanel

      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