I want to doubleclick on a header in a QTableWidget and open an editor to change the text. Having trouble with the MVC paradigm. I created my own QHeaderView, and overrode mousedoubleclickevent(). Now I don't know what to do
Code:
{ Q_OBJECT public: setItemDelegate(&delegate); } protected slots: //openPersistentEditor(index); //QItemDelegate *delegate = new QItemDelegate(this); //delegate->createEditor(lineEdit, QStyleOptionViewItem() , QModelIndex()); delegate.setEditorData(); }; private: QItemDelegate delegate; }; MyTableWidget::MyTableWidget(int rows, int columns) { RowHeaderView *rowHeaderView = new RowHeaderView(this); setVerticalHeader(rowHeaderView); ...
