Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions styleplugins/chameleon/chameleonstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,8 @@ void ChameleonStyle::drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOpti

//QTreeView的绘制复制了QCommonStyle的代码,添加了圆角的处理,hover的处理
if (qobject_cast<const QTreeView *>(w)) {
const auto &delegate = *qobject_cast<const QTreeView *>(w)->itemDelegate();
//如果QTreeView使用的不是默认代理 QStyledItemDelegate,则采取DStyle的默认绘制(备注:这里的QtCreator不会有hover效果和圆角)
if (typeid(delegate) != typeid(QStyledItemDelegate)) {
if (!qobject_cast<QStyledItemDelegate *>(qobject_cast<const QTreeView *>(w)->itemDelegate())) {
break;
}

Expand Down Expand Up @@ -577,9 +576,8 @@ void ChameleonStyle::drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOpti
}
//这里QTreeView的绘制复制了QCommonStyle的代码,添加了圆角的处理,hover的处理
if (qobject_cast<const QTreeView *>(w)) {
const auto &delegate = *qobject_cast<const QTreeView *>(w)->itemDelegate();
//如果QTreeView使用的不是默认代理 QStyledItemDelegate,则采取DStyle的默认绘制(备注:这里的QtCreator不会有hover效果和圆角)
if (typeid(delegate) != typeid(QStyledItemDelegate)) {
if (!qobject_cast<QStyledItemDelegate *>(qobject_cast<const QTreeView *>(w)->itemDelegate())) {
break;
}

Expand Down