I have a 26 by 26 window, I need to fill it with rectangles, and some rectangles are bigger than others, and through this there is space between the rectangles, but I don’t need it to be. Red rectangles are those that are larger than the others. Black highlighted the space that is not filled.
First question: Tell me how to remove it?
The second question: I fill in everything manually, and fill it up to the ends. Can I somehow not hand fill? Thought fore, but int does not see ((source:
import QtQuick 2.5 import QtQuick.Controls 1.4 ApplicationWindow { visible: true width: 2200 height: 2200 title: qsTr("Game") Rectangle {color: "black"} Grid { x: 383 y: 0 width: 1321 height: 1027 columns: 26 spacing: 0 Rectangle { color: "blue"; width: 64; height: 64 } Rectangle { color: "white"; width: 32; height: 32 } Rectangle { color: "green"; width: 32; height: 32 .................... Rectangle { color: "blue"; width: 64; height: 64 } Rectangle { color: "green"; width: 32; height: 32 } Rectangle { color: "yellow"; width: 32; height: 32 } Rectangle { color: "white"; width: 32; height: 32 } Rectangle { color: "green"; width: 32; height: 32 } ..................... Rectangle { color: "white"; width: 32; height: 32 } Rectangle { color: "yellow"; width: 32; height: 32 } Rectangle { color: "green"; width: 32; height: 32 } } } 
Grid. How do you imagine that in the grid a separate line ran into another? You need to use a different layout (or rather their combination, most likely. - ixSci