Se você precisar manter o tamanho da coluna, não use a propriedade visible
, prefira definir o item opacity
a 0
:
Exemplo:
import QtQuick 2.0
Rectangle {
width: 200
height: 200
Column { /* outer column */
spacing: 10
Text { text: "Column Element"}
Column { /* inner column */
x: 10; y: 10
spacing: 10
Rectangle { width: 40; height: 20; color: "red" }
Rectangle { width: 40; height: 20; color: "green" }
Rectangle { width: 40; height: 20; color: "blue"; opacity: 0 }
}
Text { text: "Row Element" }
Row { /* inner row */
spacing: 10
Rectangle { width: 40; height: 20; color: "red" }
Rectangle { width: 40; height: 20; color: "green" }
Rectangle { width: 40; height: 20; color: "blue" }
}
}
}
Resultado: