qDebug() - QStandardItemModel
-
I have a table of type (QStandardItemModel) of 3 lines and 1 colone.
table = new QStandardItemModel (3,1, this);
I want to display (qDebug()) just the second box of this table.
How do I do? -
I have a table of type (QStandardItemModel) of 3 lines and 1 colone.
table = new QStandardItemModel (3,1, this);
I want to display (qDebug()) just the second box of this table.
How do I do?@kzkhalil1988 hi,
qDebug() << table->item(1, 0)->text(); //Display text of row #2 //or qDebug() << table->data(table->index(1, 0)); //Display data (QVariant) of row #2 -
@kzkhalil1988 hi,
qDebug() << table->item(1, 0)->text(); //Display text of row #2 //or qDebug() << table->data(table->index(1, 0)); //Display data (QVariant) of row #2@Gojir4 said in qDebug() - QStandardItemModel:
qDebug() << table->item(1, 0)->text()
thank you
the problem is resolved -
@Gojir4 said in qDebug() - QStandardItemModel:
qDebug() << table->item(1, 0)->text()
thank you
the problem is resolved@kzkhalil1988 Glad you solved it !
Please do not forget to mark the post as solved. Thank you !