Hi.
I have a TableView with 3 columns (column 1=checkbox, column 2=X and column 3 =Y ).
I want to get cell content of selected row (checked checkbox in column 3 of row).
Immediately after checking checkbox draw a circle in specefic position (x,y).
Model of tableview is QStandardItemModel.
Code:
Canvas {
id: canvas
anchors.fill: parent
onPaint: {
var ctx = canvas.getContext("2d");
ctx.globalCompositeOperation = "source-over";
ctx.lineWidth = 1;
for(var i=1;i<=tablemodel.rowCount;i++){
console.log(tablemodel.model.get(i).XData);
console.log(tablemodel.model.get(i).YData);
Canvas {
id: canvas
anchors.fill: parent
onPaint: {
var ctx = canvas.getContext("2d");
ctx.globalCompositeOperation = "source-over";
ctx.lineWidth = 1;
for(var i=1;i<=tablemodel.rowCount;i++){
console.log(tablemodel.model.get(i).XData);
console.log(tablemodel.model.get(i).YData);
To copy to clipboard, switch view to plain text mode
I have this error:
TypeError: Property 'get' of object QStandardItemModel is not a function
Please guide me
Bookmarks