Search code examples
pythonqtwidgetpyqt4qwidget

What Qt widgets I need to use the read-only, scrollable, item list (pyqt4)


What is the best QWidget to use as such a list as in the picture.

call history

  • item = image, two texts in vertical position and other text on right align.
  • the list will be have not many items, an average of 50-100 items

Solution

  • You should create a custom form class that displays one list item. Use QLabel widgets to display texts and images.

    You can add all item widgets to a QVBoxLayout and put it in a QScrollArea. Altenatively, you can use QListWidget and put item widgets in it using QListWidget::setItemWidget. I think the second approach will be more convenient.