Project

General

Profile

Actions

Bug #3737

closed

Rendering issue in WTableView (and probably WTreeView) headers after column resize

Added by Anonymous about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
01/22/2015
Due date:
% Done:

0%

Estimated time:

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.

Actions #1

Updated by Koen Deforche about 9 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
  • Target version set to 3.3.4
Actions #2

Updated by Koen Deforche about 9 years ago

  • Status changed from InProgress to Resolved
Actions #3

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF