#include "LogDock.hxx"
#include <log4cxx/patternlayout.h>
+#include <QTimer>
using namespace log4cxx::helpers;
target->item(rowcount, 1)->setBackground(rowcolor);
target->item(rowcount, 2)->setBackground(rowcolor);
target->resizeColumnsToContents();
+
+ QTimer *timer = new QTimer(target);
+ timer->setSingleShot(true);
+
+ QObject::connect(timer, &QTimer::timeout, [=]() {
+ target->scrollToItem(target->item(rowcount, 2), QAbstractItemView::PositionAtTop);
+ });
+ timer->start(10);
}
void LogDockAppender::setTarget(LogDock *target) {