+ scene()->setWidth(event->size().width() - 2); // FIXME figure out why we have to hardcode the -2 here
+ verticalScrollBar()->setValue(verticalScrollBar()->maximum());
+}
+
+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());