Patch for KDirOperator: make columns in detailled view resizable
Peter Penz
peter.penz at gmx.at
Wed Oct 3 22:31:53 BST 2007
Hi Anders,
I had some time today already to integrate your patch :-)
On Wednesday, 3. October 2007 20:57, Anders Lund wrote:
> On Wednesday 03 October 2007, Peter Penz wrote:
> > Thanks for the patch. I'll try to integrate it until the end of this week
> > and will do some tests with Kates sidebar too.
>
> One option to get the nice sizing you want would be to use
> QAbstractItemView::sizeHintForColumn to set the sizes in the first resize
> event where rowcount() > 0, and then just leave the user to set the sizes.
I think I've found a mixture which combines the benefit of both approaches:
a) Resize the columns when opening the file-dialog, but assure that the
minimum width of the name-column is no hardcoded value as before but the
preferred width.
b) Let the user resize the columns and don't do an automatic resizing after
the user has changed the size of at least one column.
I've committed the patch and tested with the Kate-sidebar. Please let me know
your opinion on this.
One important note: I could not implement b) in the way I wanted to have it.
Currently there seems to be no easy way in QHeaderView to find out whether
the resizing of a column has been done by the user (the signal 'sectionMoved'
is also emitted if an internal resizing is done). I've implemented a
workaround which turns off the automatic resizing after a short time, but
I'll try to fix this in a clean way later.
Best regards,
Peter
More information about the kde-core-devel
mailing list