The underlying widget in the QTreeView is a QLineEdit and as such does not support word wrapping even if you tell it to. To fix this I will have to subclass QStyledItemDelegate and install it and then reimplement its size hints and paint methods.
This is a lot of work so I want to understand why this is needed since editing of long metadata items would be much easier in the content.opf as opposed to a field in a TreeView.
What exactly are you storing that takes up so much room you can't store it in the continously expanding space provided. No title, author, etc could have that long a name.
Are you trying to store an entire abstract into a dc:description element? Is that the reason this feature is needed? You can always manually resize the columns and the dialog and scroll bars will appear for items longer than your screen allows.
So please help me to understand what the real use case is? If it is to edit large blocks of text, then doing that in the content.opf is simply easier/better since you have large amounts of screen real estate to work in.
KevinH
|