I have QListWidgetone that has many elements added to it, however I want it to QListWidgetautomatically scroll to the last element every time a new element is added to it. Is it possible?
QListWidget
listWidget->scrollToBottom() will work
listWidget->scrollToBottom()
try the scrollTo method inherited from QAbstractItemView http://doc.qt.io/qt-5/qabstractitemview.html#scrollTo
scrollToItem().
Qt signal/slot:
connect(listWidget->model(), SIGNAL(rowsInserted(QModelIndex,int,int)), listWidget, SLOT(scrollToBottom()));
https://forum.qt.io/topic/1770/qlistwidget-auto-scroll/4
Source: https://habr.com/ru/post/1796046/More articles:EclipseLink dynamic MOXy access to enum values - javaНабор символов соответствия и необязательный объект - phpJQuery Dialog - the object does not support this property or method - jqueryError trying to use wmi (python) objects - pythonChange text color with style tag - htmlHow to save multiple values inside a single cookie in Ruby on Rails? - ruby | fooobar.comКак создать facebook настенные сообщения и добавить сетчатую версию изображения - iphoneiPhone sdk - using a custom camera - iphoneBorovka Algorithm MST - javaJoin 3 tables using the Doctrine_RawSql object - joinAll Articles