2 pièce(s) jointe(s)
GridLayout dans ScrollView
:salut: à tous,
J'ai besoin de disposer plusieurs items dans un scrollview. Pour me simplifier la vie je pense à utiliser un GridLayout. Malheureusement je ne parviens pas à obtenir un résultat correct.
Voici un exemple de mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| import QtQuick 2.2
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.1
//GroupBox{
//title: qsTr("Rapport d'intervention")
ScrollView{
//anchors.fill: parent
GridLayout {
id: gridInter
width : parent.width
height: parent.height
columns: 3
Label{
text : "Points de contrôles"
Layout.fillWidth : true
}
Label{
text : "Conformité"
Layout.fillWidth : true
}
Label{
text : "Commentaires"
Layout.fillWidth : true
}
//}
}
} |
Vous constaterez la présence d'un GroupBox. Dans le projet, mon scrollview est dans un cet item. J'ai fait plusieurs tests en commentant - décommentant certaines lignes, mais rien n'y fait. Je joins deux screens de ce que j'obtiens.
Pièce jointe 138434
Pièce jointe 138435
Quelqu'un aurait une piste ?
D'avance merci.
J