[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Multi column lists
From:       Rik Hemsley <rik () rikkus ! demon ! co ! uk>
Date:       1999-06-24 18:09:35
[Download RAW message or body]


On 23-Jun-99 Don Sanders wrote:
>> Again, you can do this by catching header clicks.
> I take it you mean mean overriding the setSorting method ?? No? How else does
> one "catch header clicks"? Overriding the setSorting method worked but seems
> a
> little cludgy.

No, I mean catching header clicks :)

QObject::connect(
        this->header(), SIGNAL(headerClicked(int)),
        this,           SLOT(s_headerClicked(int)));

> 1) Is there a method that will scroll the list to show another item as
> long as the currently selected item isn't scrolled out of view. (For when new
> mail is added to the currently selected folder).

ensureItemVisible()

> 2) Is there a method to set a background pixmap for a QListView.
> setBackgroundPixmap doesn't seem to work and is deprecated anyway. If it is
> possible can the background pixmap be tiled?

AFAIK there isn't a way to do it for now. You'd have to override
QListViewItem::paintEvent(). It's not easy, but it's entirely possible. You
really don't want to do it though unless you're going to add it to the KDE
style code.

> 3) Is there a method to show icons in the header columns? Well that's a
> loaded
> question I've been playing with the undocumented setColumnText function that
> allows you to place an icon before the text. It's okay but limiting (what if
> I
> want the icon after the text?)

No, you can't put icons in the header columns, but I'm assured this is being
looked at by the Trolls. If you want an icon after the text, firstly you're
breaking the user's expectations, but you can do it. Again you must
override QListViewItem::paintEvent().

Cheers,
Rik


--
KDE - Colour outside the lines  : http://www.kde.org
[[without]] - software for KDE  : http://without.netpedia.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic