Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Forcing the last item in a QListWidget to appear at the very bottom of the list
notgary last edited by
I'd like to implement a
QListWidgetthat has one particular
QListWidgetItemthat will always be fixed at the very bottom of the visible portion of the widget. This will always be the same item and it should always appear at the bottom in the same way the first item maintains it's position at the top. The figure below illustrates what I'm after.
If I were laying out widgets in a layout, I would use
QBoxLayoutaddStretchto force the widgets to remain apart, but there doesn't appear to be anything similar for
QListWidget. Does anyone have any idea how I could go about achieving this?
raaghuu last edited by
you could use insertItem() instead of addItem() to add new items...