1
0
mirror of https://github.com/QtExcel/QXlsx.git synced 2025-01-30 05:02:52 +08:00
QXlsx/HelloAndroid/main.qml
2018-07-12 18:15:23 +09:00

45 lines
797 B
QML

// main.qml
import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Controls 1.4
Window {
id: mainWindow;
visible: true;
width: 640; height: 480;
title: qsTr("Hello World");
Component
{
id: columnComponent
TableViewColumn { width: 100 }
}
TableView {
id: mainTableView;
anchors.fill: parent;
model: xlsxModel;
resources:
{
var roleList = xlsxModel.customRoleNames;
var temp = [];
for(var i=0; i<roleList.length; i++)
{
var role = roleList[i];
temp.push(columnComponent.createObject(mainTableView, { "role": role, "title": role}));
}
return temp;
}
} // TableView
} // Window