Skip to content

Commit

Permalink
feat: Selected effects in the rune plugin were replaced
Browse files Browse the repository at this point in the history
Selected effects in the rune plugin were replaced
  • Loading branch information
JWWTSL committed Nov 24, 2023
1 parent 8796f54 commit b912372
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/symbol/mainframe/symboltreeview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ SymbolTreeView::SymbolTreeView(DWidget *parent)
, d (new SymbolTreeViewPrivate(this))
{
d->model = new SymbolModel();
d->delegate = new SymbolDelegate;
DTreeView::setModel(d->model);
DTreeView::setItemDelegate(d->delegate);

setContextMenuPolicy(Qt::CustomContextMenu);
setEditTriggers(DTreeView::NoEditTriggers); //节点不能编辑
setSelectionBehavior(DTreeView::SelectRows); //一次选中整行
setSelectionMode(DTreeView::SingleSelection); //单选,配合上面的整行就是一次选单行
setFocusPolicy(Qt::NoFocus); //去掉鼠标移到节点上时的虚线框
setSelectionMode(DTreeView::SingleSelection); //每次单选一行
header()->setVisible(false);

QObject::connect(this, &DTreeView::doubleClicked,
this, &SymbolTreeView::doDoubleClieked,
Qt::UniqueConnection);
QObject::connect(this, &DTreeView::customContextMenuRequested,
this, &SymbolTreeView::doContextMenu,
Qt::UniqueConnection);


}

SymbolTreeView::~SymbolTreeView()
Expand Down

0 comments on commit b912372

Please sign in to comment.