Skip to content

Commit

Permalink
working on json model
Browse files Browse the repository at this point in the history
  • Loading branch information
sadeqAlbana committed Oct 16, 2022
1 parent 5d9d65e commit 17b2aa7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "libs/QmlRoundedRectangle"]
path = libs/QmlRoundedRectangle
url = http://git.lan:9080/sadeq/QmlRoundedRectangle.git
[submodule "libs/json-model"]
path = libs/json-model
url = http://git.lan:9080/sadeq/json-model.git
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml)
find_package(Qt6 COMPONENTS Qml Core5Compat Gui Widgets Charts Quick QmlImportScanner REQUIRED)

add_subdirectory(src)
add_subdirectory(libs/json-model)
add_subdirectory(libs/QmlRoundedRectangle)

if(COREUI_BUILD_EXAMPLES)
Expand Down
37 changes: 20 additions & 17 deletions examples/demo/pages/Typography.qml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ Page {
Layout.fillWidth: true
implicitHeight: contentHeight*4
model: TableModel{
TableModelColumn { display: "heading"; edit: "Test" }
TableModelColumn { display: "example" }
Component.onCompleted: console.log(headerData(0,Qt.Horizontal,Qt.DisplayRole))
TableModelColumn { display: "heading"; edit: "test"; decoration: "a" }
TableModelColumn { display: "example"; edit: "ee"; decoration: "aaa" }

rows:[
{heading:"<h1></h1>",example:"<h1>h1. Bootstrap heading</h1>"},
{heading:"<h2></h2>",example:"<h2>h2. Bootstrap heading</h2>"},
Expand All @@ -61,22 +63,23 @@ Page {

rowHeightProvider: function(){return 65}

horizontalHeaderView: HorizontalHeaderView{
reuseItems: false
syncView: tableView
implicitHeight: 60
parent: tableView
anchors.left: parent.left
z:100
height: 60
clip: tableView.clip
boundsBehavior: tableView.boundsBehavior
// horizontalHeaderView: HorizontalHeaderView{
// reuseItems: false
// syncView: tableView
// implicitHeight: 60
// parent: tableView
// anchors.left: parent.left
// z:100
// height: 60
// clip: tableView.clip
// boundsBehavior: tableView.boundsBehavior

delegate: Text{
//text: model.edit
color: "red"
}
}
//// delegate: Text{
//// text:
//// Component.onCompleted: console.log(model.whatsThis)
//// color: "red"
//// }
// }

delegate: CLabel{
text: display?? " "
Expand Down
1 change: 1 addition & 0 deletions libs/json-model
Submodule json-model added at 0e8d42

0 comments on commit 17b2aa7

Please sign in to comment.