[Qt-interest] how to creat a different height editer from it’s item In a QItemDelegate?

qingqiu fu fuqingqiu at gmail.com
Thu Jul 8 10:45:07 CEST 2010


am work on creat a SlippingItemView view by delegate.
The slipping UI like:

--------------------
item1
 ------------------
|item2 editer      |
|(different height)|
 ------------------
item3                 <--this be covered
...
--------------------

QItemDelegate show editer on item clicked , QItemDelegate::paint()
reimplemented to draw the item , QItemDelegate::creatEditer() reimplemented
to show a different height editer.

It is easy to creat a different height editer by reimplemented
QItemDelegate::updateEditorGeometry() , but the item sizehint will not
change . Problem is editer will cover the sibling item (for example: item3).

*Question : Is there any way to update item sizehint to it’s editer , and
resume normal height when editer closed?*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100708/a8f3517b/attachment.html 


More information about the Qt-interest-old mailing list