Backdrop in QListView using PyQt, possible?

Boudewijn Rempt boud at valdyas.org
Tue Apr 30 12:03:05 EDT 2002


<posted & mailed>

Moray Taylor wrote:

> Is it possible to apply a backdrop to a QListView, i.e. a PNG or
> whatever, loaded into a QImage and used as a tiled (or otherwise)
> backdrop, like you can on a QCanvas?
> 

It should be possible, but it won't be as easy as with those myriad Visual 
Basic grid controls, that can put a complete avi flick in the backdrop 
(poor secretary who finds that in his productivity app!)

Perhaps you can fake it by creating your own widget style. Otherwise you're 
up against some serious re-implementation of the paint method of both 
QListView and QListViewItem.

Or, but I don't know whether it'll work, you might want to investigate the 
setBackgroundPixmap (or the modern equivalent) of QWidget: a QListView is a 
QWidget, even if a QListViewItem isn't.

-- 
Boudewijn Rempt | http://www.valdyas.org



More information about the Python-list mailing list