-
-void ChatView::appendChatLines(QList<ChatLine *> list) {
- foreach(ChatLine *line, list) {
-
- }
+void ChatView::sceneHeightChanged(qreal h) {
+ Q_UNUSED(h)
+ bool scrollable = qAbs(verticalScrollBar()->value() - verticalScrollBar()->maximum()) <= 2; // be a bit tolerant here, also FIXME (why we need this?)
+ setSceneRect(scene()->sceneRect());
+ if(scrollable) verticalScrollBar()->setValue(verticalScrollBar()->maximum());