#include <QHeaderView>
#include <QMenu>
#include <QMouseEvent>
+#include <QScrollBar>
/*!
\class QtxTreeView::Header
this, SLOT( onAppropriate( Qt::Orientation, int, int ) ) );
}
+// This method fixes problem with Object Browser horizontal scrollbar automatic scrolling to the right
+void QtxTreeView::scrollTo(const QModelIndex &index,
+ QAbstractItemView::ScrollHint hint)
+{
+ QScrollBar* aScrollBar = horizontalScrollBar();
+ if (aScrollBar) {
+ int horPos = aScrollBar->value();
+ QTreeView::scrollTo(index, hint);
+ aScrollBar->setValue(horPos);
+ }
+ else {
+ QTreeView::scrollTo(index, hint);
+ }
+}
+
void QtxTreeView::onAppropriate( Qt::Orientation orient, int first, int last )
{
if( orient==Qt::Horizontal )