Thanks for the link, I was unaware of this property.
No, and yes. The aim is to deliver the most intuitive editor which is splitted into cells. Editor-on-demand would be sufficient, but there are several drawbacks:
a) when you click in the cell -- how do you get exact textual position? (you can calculate it by hand), persistent editor does it for you
b) you don't get back focus once you lost it (at least on KDE focus follows mouse policy) -- you move your mouse out of the window, you get back (but not over the table), no editing state; again -- persistent editor does the trick
c) it is rather a bug -- cell item rendering and editor rendering differs just a tiny bit, but it is enough to see the text is moving when clicked, and word wrapping sometimes is different; when you use persistent editors, there is no such problem, because all you see is table of editors
So I better stick to persistent editors -- anyway, in both cases I need pointer to editor and I managed to get that pointer via delegate.
Table delegate pass model index to created editor, when it is converted to persistent model index. I keep all the time (in the delegate) collection of created editors -- so I can query delegate to find for me editor for given model index.
Thank you for your help. have a nice day, bye





Reply With Quote
Bookmarks