[PyKDE] Shading after QListView.setSelected()

Jeffrey Barish jeff_barish at earthlink.net
Mon Mar 28 23:06:35 BST 2005

This question has to be something simple, but I just started programming
PyQt.  I fill a listview with lines of text then select the first line
with QListView.setSelected(QListView.firstChild(), True).  The
appropriate item is shaded, but the shading is grey rather than blue. 
I figure that means that the item is not enabled.  Right so far?  So I
tried QListView.firstChild().setEnabled(True).  I get an
AttributeError.  The Qt documentation says that QListView.firstChild()
returns a QListViewItem and that QListViewItem has an attribute
setEnabled.  Is this a bug?  Using isEnabled() also produces an
Jeffrey Barish

More information about the PyQt mailing list