1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
LibQQt/qqttreeview.cpp
tianduanrui 3f857669fc init
2016-12-29 16:49:18 +08:00

40 lines
944 B
C++
Executable File

#include "qqttreeview.h"
#include "ui_qqttreeview.h"
#include <QFile>
QQTTreeView::QQTTreeView(QWidget *parent) :
QTreeView(parent),
ui(new Ui::QQTTreeView)
{
ui->setupUi(this);
setSelectionMode(QAbstractItemView::SingleSelection);
setSelectionBehavior(QAbstractItemView::SelectRows);
setEditTriggers(QAbstractItemView::NoEditTriggers);
header()->setResizeMode(QHeaderView::ResizeToContents);
#ifdef __MIPS_LINUX__
setFocusPolicy(Qt::NoFocus);
#endif
QFont fnt(font());
fnt.setPointSize(16);
setFont(fnt);
}
QQTTreeView::~QQTTreeView()
{
delete ui;
}
void QQTTreeView::drawRow(QPainter *painter, const QStyleOptionViewItem &options, const QModelIndex &index) const
{
return QTreeView::drawRow(painter, options, index);
}
void QQTTreeView::drawBranches(QPainter *painter, const QRect &rect, const QModelIndex &index) const
{
return QTreeView::drawBranches(painter, rect, index);
}