Hello,

I'm struggling to grasp the concept behind QtQuick.Layouts.
I want to create a 3 column UI that fills up the window without setting fixed sizes. Then in each column there should be multiple rows with no fixed widths.
So far, I have been unable to achieve this with the code below, instead it shows 3 red, green, blue columns next to each other. Is there some Layout limitation in place or the whole solution is wrong and I should use other means to achieve this?
All the examples I found use a fixed width/height, but that doesn't work for my goal.
Thank you!

view.qml
Qt Code:
  1. Import QtQuick 2.2
  2. Import QtQuick.Layouts 1.0
  3.  
  4. RowLayout {
  5. spacing: 2
  6.  
  7. Rectangle {
  8. Layout.fillWidth: true
  9. Layout.fillHeight: true
  10. color: "red"
  11.  
  12. ColumnLayout {
  13. spacing: 2
  14.  
  15. Rectangle {
  16. Layout.fillWidth: true
  17. height: 32
  18. color: "black"
  19. }
  20. Rectangle {
  21. Layout.fillWidth: true
  22. height: 32
  23. color: "yellow"
  24. }
  25. Rectangle {
  26. Layout.fillWidth: true
  27. height: 32
  28. color: "pink"
  29. }
  30. Rectangle {
  31. Layout.fillWidth: true
  32. height: 32
  33. color: "brown"
  34. }
  35. }
  36. }
  37.  
  38.  
  39. Rectangle {
  40. Layout.fillWidth: true
  41. Layout.fillHeight: true
  42. color: "green"
  43. }
  44.  
  45.  
  46. Rectangle {
  47. Layout.fillWidth: true
  48. Layout.fillHeight: true
  49. color: "blue"
  50. }
  51. }
To copy to clipboard, switch view to plain text mode