void Table_impl::SLOT_add_row()
{
__item->setText("Bla bla bla...");
table->setRowCount(table->rowCount() + 1);
table->setItem(table->rowCount()-1, 0, Item_0);
//table->setItem(table->rowCount()-1, 1, Item_1);
table->setCellWidget(table->rowCount()-1, 1, A_listWidget);
table->setItem(table->rowCount()-1, 2, Item_2);
table->setItem(table->rowCount()-1, 3, Item_3);
Item_0->setCheckState(Qt::Unchecked);
Item_0->setFlags(Item_0->flags() & (~(Qt::ItemIsEditable)));
Item_1->setFlags(Item_1->flags() & (~(Qt::ItemIsEditable)));
Item_2->setFlags(Item_2->flags() & (~(Qt::ItemIsEditable)));
this->resize(table->width() + 4, this->height() + table->rowHeight(table->rowCount()-1));
}
void Table_impl::SLOT_add_row()
{
QListWidget *A_listWidget;
A_listWidget = new QListWidget(table);
QListWidgetItem *__item = new QListWidgetItem(A_listWidget);
__item->setText("Bla bla bla...");
table->setRowCount(table->rowCount() + 1);
QTableWidgetItem *Item_0 = new QTableWidgetItem();
QTableWidgetItem *Item_1 = new QTableWidgetItem("");
QTableWidgetItem *Item_2 = new QTableWidgetItem("");
QTableWidgetItem *Item_3 = new QTableWidgetItem("");
table->setItem(table->rowCount()-1, 0, Item_0);
//table->setItem(table->rowCount()-1, 1, Item_1);
table->setCellWidget(table->rowCount()-1, 1, A_listWidget);
table->setItem(table->rowCount()-1, 2, Item_2);
table->setItem(table->rowCount()-1, 3, Item_3);
Item_0->setCheckState(Qt::Unchecked);
Item_0->setFlags(Item_0->flags() & (~(Qt::ItemIsEditable)));
Item_1->setFlags(Item_1->flags() & (~(Qt::ItemIsEditable)));
Item_2->setFlags(Item_2->flags() & (~(Qt::ItemIsEditable)));
this->resize(table->width() + 4, this->height() + table->rowHeight(table->rowCount()-1));
}
To copy to clipboard, switch view to plain text mode
Bookmarks