Commit a99d40fe authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee
Browse files

[ #13690 ] Fix IM scrolling

parent 67430e52
......@@ -85,4 +85,12 @@ IMTab::IMTab(InstantMessagingModel* model,QWidget* parent) : QListView(parent)
// setWrapping(true);
setUniformItemSizes(false);
setItemDelegate(new ImDelegates(this));
setVerticalScrollMode(ScrollPerPixel);
connect(model,SIGNAL(dataChanged(QModelIndex, QModelIndex)),this,SLOT(scrollBottom()));
}
void IMTab::scrollBottom()
{
scrollTo(model()->index(model()->rowCount()-1,0));
}
\ No newline at end of file
......@@ -44,6 +44,8 @@ class IMTab : public QListView
Q_OBJECT
public:
IMTab(InstantMessagingModel* model,QWidget* parent = nullptr);
private slots:
void scrollBottom();
};
#endif // IM_MANAGER
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment