tags:

views:

222

answers:

1

Hi everyone,

I tried to write an editable table based on QTreeView with wordwraped content in cells which in turn should expand in height (that whole text was visible) like usual cells in tables like in MSWord, but have met insuperable obstacles:

first - i can't set fixed cell size.

second - i can't make text display in cells wordwraped. For this i used void QTreeWidget::setItemWidget ( QTreeWidgetItem * item, int column, QWidget * widget ), but it works only for readonly solutions. And i haven't come up with any other idea.

Can such behavior of QTreeView be realized? And how to solve those problems of mine?

Thanks in advance

Serge

A: 

You should inherit QTreeView instead of QTreeWidget. And I fear that you may have to specialize from QAbstractItemView, QAbstractItemDelegate and QAbstractItemModel.

tharibo