KListWidget

KDE 4.5 PyKDE API Reference

- KDE's Python API

# KListWidget Class Reference

`from PyKDE4.kdeui import *`

Inherits: QListWidget → QListView → QAbstractItemView → QAbstractScrollArea → QFrame → QWidget → QObject
Subclasses: KCompletionBox

## Detailed Description

A variant of QListWidget that honors KDE's system-wide settings.

Extends the functionality of QListWidget to honor the system wide settings for Single Click/Double Click mode, Auto Selection and Change Cursor over Link.

There is a new signal executed(). It gets connected to either QListWidget.itemClicked() or QListWidget.itemDoubleClicked() depending on the KDE wide Single Click/Double Click settings. It is strongly recommended that you use this signal instead of the above mentioned. This way you don't need to care about the current settings. If you want to get informed when the user selects something connect to the QListWidget.itemSelectionChanged() signal.

## Signals
| doubleClicked (QListWidgetItem item, QPoint pos)
| executed (QListWidgetItem item)
| executed (QListWidgetItem item, QPoint pos)
## Methods
| __init__ (self, QWidget parent=0)
| focusOutEvent (self, QFocusEvent e)
| keyPressEvent (self, QKeyEvent e)
| leaveEvent (self, QEvent e)
| mouseDoubleClickEvent (self, QMouseEvent e)
| mousePressEvent (self, QMouseEvent e)

## Signal Documentation

doubleClicked | ( | QListWidgetItem | item,
|  | QPoint | pos
| ) |  |  |

This signal gets emitted whenever the user double clicks into the listbox.

Parameters:

  | item | The pointer to the clicked listbox item.
  | pos | The position where the user has clicked.

Note that you may not delete any QListWidgetItem objects in slots connected to this signal.

This signal is more or less here for the sake of completeness. You should normally not need to use this. In most cases it's better to use executed() instead.

Signal syntax:
  `QObject.connect(source, SIGNAL("doubleClicked(QListWidgetItem*, const QPoint&)"), target_slot)`

executed | ( | QListWidgetItem | item
| ) |  |  |

Emitted whenever the user executes an listbox item.

That means depending on the KDE wide Single Click/Double Click setting the user clicked or double clicked on that item.

Parameters:

  | item | is the pointer to the executed listbox item.
  | pos | is the position where the user has clicked

Note that you may not delete any QListWidgetItem objects in slots connected to this signal.

Signal syntax:
  `QObject.connect(source, SIGNAL("executed(QListWidgetItem*)"), target_slot)`

executed | ( | QListWidgetItem | item,
|  | QPoint | pos
| ) |  |  |

Emitted whenever the user executes an listbox item.

That means depending on the KDE wide Single Click/Double Click setting the user clicked or double clicked on that item.

Parameters:

  | item | is the pointer to the executed listbox item.
  | pos | is the position where the user has clicked

Note that you may not delete any QListWidgetItem objects in slots connected to this signal.

Signal syntax:
  `QObject.connect(source, SIGNAL("executed(QListWidgetItem*, const QPoint&)"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent=0
| ) |  |  |

focusOutEvent | ( | self, |
|  | QFocusEvent | e
| ) |  |  |

keyPressEvent | ( | self, |
|  | QKeyEvent | e
| ) |  |  |

leaveEvent | ( | self, |
|  | QEvent | e
| ) |  |  |

mouseDoubleClickEvent | ( | self, |
|  | QMouseEvent | e
| ) |  |  |

mousePressEvent | ( | self, |
|  | QMouseEvent | e
| ) |  |  |