first qml prototype
This commit is contained in:
35
quick/quickview.qml
Normal file
35
quick/quickview.qml
Normal file
@@ -0,0 +1,35 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
TableView
|
||||
{
|
||||
id: table
|
||||
anchors.fill: parent
|
||||
columnSpacing: 2
|
||||
rowSpacing: 2
|
||||
model: meinModel // z. B. QStandardItemModel mit 9 Spalten
|
||||
|
||||
delegate: Rectangle
|
||||
{
|
||||
|
||||
required property string display
|
||||
width: 100
|
||||
height: 20
|
||||
border.color: "#ccc"
|
||||
|
||||
Text
|
||||
{
|
||||
anchors.centerIn: parent
|
||||
text: display
|
||||
font.pixelSize: 10
|
||||
}
|
||||
}
|
||||
|
||||
// // Optional: Spaltenbreiten setzen
|
||||
// onModelChanged: {
|
||||
// for (let i = 0; i < model.columns; ++i)
|
||||
// table.setColumnWidth(i, 100)
|
||||
// }
|
||||
}
|
||||
|
Reference in New Issue
Block a user