update
parent
a1c8672a5a
commit
cff6aaf6f4
|
@ -14,7 +14,12 @@ Item {
|
|||
signal requestPage(int page,int count)
|
||||
|
||||
id:control
|
||||
implicitHeight: layout_coumns.height + layout_table.height
|
||||
implicitHeight: layout_table.height
|
||||
|
||||
QtObject{
|
||||
id:d
|
||||
property int coumnsWidth: parent.width
|
||||
}
|
||||
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
|
@ -32,6 +37,13 @@ Item {
|
|||
onColumnsChanged: {
|
||||
model_coumns.clear()
|
||||
model_coumns.append(columns)
|
||||
var w = 0
|
||||
for(var i=0;i<model_coumns.count;i++){
|
||||
var item = model_coumns.get(i)
|
||||
w=w+item.width
|
||||
console.debug(item.width)
|
||||
}
|
||||
d.coumnsWidth = w
|
||||
}
|
||||
|
||||
onDataSourceChanged: {
|
||||
|
@ -39,12 +51,35 @@ Item {
|
|||
model_data_source.append(dataSource)
|
||||
}
|
||||
|
||||
FluRectangle{
|
||||
Flickable{
|
||||
id:layout_flickable
|
||||
height: layout_table.height
|
||||
anchors{
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
contentWidth: layout_table.width
|
||||
ScrollBar.horizontal: FluScrollBar {
|
||||
}
|
||||
Rectangle{
|
||||
anchors.fill: layout_table
|
||||
radius: 5
|
||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
}
|
||||
ListView{
|
||||
id:layout_table
|
||||
height: contentHeight
|
||||
width: Math.max(layout_flickable.width,d.coumnsWidth)
|
||||
clip:true
|
||||
interactive: false
|
||||
|
||||
header: FluRectangle{
|
||||
id:layout_coumns
|
||||
height: control.itemHeight
|
||||
width: parent.width
|
||||
color:FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1)
|
||||
radius: [12,12,0,0]
|
||||
radius: [5,5,0,0]
|
||||
|
||||
Row{
|
||||
id:list_coumns
|
||||
|
@ -77,20 +112,6 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Rectangle{
|
||||
anchors.fill: layout_table
|
||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
}
|
||||
|
||||
ListView{
|
||||
id:layout_table
|
||||
anchors{
|
||||
top: layout_coumns.bottom
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
height: contentHeight
|
||||
clip:true
|
||||
footer: Item{
|
||||
height: 50
|
||||
width: layout_table.width
|
||||
|
@ -157,6 +178,10 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Component{
|
||||
id:com_text
|
||||
Item{
|
||||
|
|
Loading…
Reference in New Issue