Bug #3737
closedRendering issue in WTableView (and probably WTreeView) headers after column resize
0%
Description
Hi,
I'm using WTableViews with user-resizable columns. Sometimes (mostly after loading data, that is) I set the column width automatically by the program using
table->setColumnWidth(col, val);
When this happens after the columns have already been resized by the user, the headers of the user-resized columns get kind of stuck on this width and the width "val" given by WTableView::setColumnWidth() is not applied to them.
I tried to fiddle around the problem for a bit, but cannot figure out a suitable workaround. I tried the following code as my last approach, but it does not seem to do the trick either:
@
// itemView is WTableView with a valid model applied to it,
// column resize has just happened via setColumnWidth()
if (itemView->isColumnResizeEnabled()) {
itemView->setColumnResizeEnabled(false);
itemView->setColumnResizeEnabled(true);
itemView~~model()~~>layoutChanged().emit();
}
@ ¶
Using the above code causes the list to display part of the "loading" background permanently when a column was manually dragged smaller then its original width before by the user, so unfortunately it seems I can only do so much.
Updated by Koen Deforche almost 10 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
- Target version set to 3.3.4
Updated by Koen Deforche almost 10 years ago
- Status changed from InProgress to Resolved
Updated by Koen Deforche almost 10 years ago
- Status changed from Resolved to Closed