I want to use a QTableView. This is a result of some tests.
As you can see, there are some boxes in every cell, before the content "123". What are these boxes and how can I remove these?
I think I need to change some properties of the QTableView, but I did not found a property related to these misterious boxes. Here some code I used:
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
{
//...
TVLDataModel* model = new TVLDataModel();
ui->uxTVLView->setModel(model);
}
TVLDataModel (inherits QAbstractTableModel)
int TVLDataModel::rowCount(const QModelIndex &parent) const
{
return 2;
}
int TVLDataModel::columnCount(const QModelIndex &parent) const
{
return 2;
}
QVariant TVLDataModel::data(const QModelIndex &index, int role) const
{
return 123;
}