Delete QTableWidget selected rows
Solved
General and Desktop
-
wrote on 16 Jun 2021, 20:24 last edited by VRonin
@hbatalha said in Delete QTableWidget selected rows:
Is it possible to have something like that?
class CheckBoxDelegate : public QStyledItemDelegate{ Q_DISABLE_COPY(CheckBoxDelegate) public: using QStyledItemDelegate::QStyledItemDelegate; protected: void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const override{ QStyledItemDelegate::initStyleOption(option,index); option->palette.setColor( QPalette::Active, QPalette::Base, Qt::blue ); } };
tableWidget->setItemDelegate(new CheckBoxDelegate(this));
-
@hbatalha said in Delete QTableWidget selected rows:
Is it possible to have something like that?
class CheckBoxDelegate : public QStyledItemDelegate{ Q_DISABLE_COPY(CheckBoxDelegate) public: using QStyledItemDelegate::QStyledItemDelegate; protected: void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const override{ QStyledItemDelegate::initStyleOption(option,index); option->palette.setColor( QPalette::Active, QPalette::Base, Qt::blue ); } };
tableWidget->setItemDelegate(new CheckBoxDelegate(this));
21/22